Mike Spreitzer wrote:

Sorry if I have confused people by presenting
evidence in the wrong order.  Also, it seems that the .sql file is
written by the client while the .txt file is (attempted to be) written
by the server.  Here is a single typescript with all the evidence:
[EMAIL PROTECTED] ~]# cd / [EMAIL PROTECTED] /]# rm -f dump1/* [EMAIL PROTECTED] /]# ls -ld dump1 drwxrwxrwx 2 mysql mysql 4096
Feb 22 20:45 dump1
[EMAIL PROTECTED] /]# ls -l dump1 total 0 [EMAIL PROTECTED] /]# mysqldump -u root -p
--skip-opt --quick --tab=/dump1 wyky red1_p2
Enter password: mysqldump: Got error: 1: Can't create/write
to file '/dump1/red1_p2.txt' (Errcode: 13) when executing 'SELECT INTO
OUTFILE'
^^^^

I'm reading thru http://dev.mysql.com/doc/refman/5.0/en/select.html and it says that it will not write to an already existing file (so you deleted the old files) and you need the FILE privilege, and that it writes the file mode 777 as the user running the client (and suggests not using root).

I would try $ rm -f /dump1/*
$ echo "SELECT * FROM red1_p2 INTO OUTFILE '/dump1/red1_p2.txt';" \
| mysql -u root -p

to see if this is a mysql permissions issue. The above will create a file owned by the mysql process. You might try changing the directory to /tmp or /var/tmp to see if that makes some kind of magical difference.

Might also check your grants for [EMAIL PROTECTED] Unlikely, but possible.

Also, check /var/log/messages and if there's any SELinux warnings. You might have the option 'secure_file_priv' set? http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_secure-file-priv



Jed

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to