[ciapug] mysqldump php
Barry Von Ahsen
barry at vonahsen.com
Mon Nov 13 15:43:44 CST 2006
I've needed to restart the various services (usually mysql) after
chowning the target directories. I ususally create a apache/mysql group
for this purpose.
-barry
Dave J. Hala Jr. wrote:
> Anyone try dumping a database from a php script? I'm using exec to run
> the following command:
>
> /usr/bin/mysqldump dbname dbtable --tab /var/www/html/webdir
> --fields-enclosed-by "'" --fields-terminated-by ","
>
> I keep getting the following message in my log:
> mysqldump: Got error: 1: Can't create/write to file
> '/var/www/html/webdir/dbtable.txt' (Errcode: 13) when executing 'SELECT
> INTO OUTFILE'
>
>
> I know this means that mysqldump couldn't write the file. However, no
> matter what I change the ownership/permissions to in the directory, I
> get the same error. I even tried running apache as the user "mysql",
> and chowning the webserver root to mysql and then doing a chmod -R 755.
> I also tried creating the file in the /tmp folder. No luck.
>
> I'm currently running centos 4.x, apache 2.0 and mysql 4.1.20.
> Previously I was running RH 9.0, apache 2.0 and mysql 3.2 and the script
> run ran fine. (root owned the web dir)
>
> The mysql server and apache are on the same box.
>
> Anyone got any thoughts on this?
>
>
> :) Dave
>
>
>
>
More information about the ciapug
mailing list