On Tue, 2002-07-16 at 02:31, Bill Bernat wrote:
> Question:  is there anything I need to be aware of when writing dump
> files to a local directory for my user, I'm having the following
> problem.
> 
> 1. I create a directory in my own home directory (linux, red hat 7.2)
> ~/dumps and give it 777 permissions 
> 
> 2. I run " /usr/local/mysql/bin/mysqldump -uroot -p<<pass>> --tab ~/dumps
> dbname table1 table2"
> 
> 3. The .sql file for table1 gets created, correctly, in the dumps directory
> fine.
> 
> 4. mysqldump pukes when trying to write the .txt file:
> 
> /usr/local/mysql/bin/mysqldump: Got error: 1: Can't create/write to file
> '/home/bbernat/dumps/customer_relations_database.txt' (Errcode: 13) when
> executing 'SELECT INTO OUTFILE'
> 
> QUESTION:
> What have I done wrong and how can I fix it?

Hi, 

I was curious about your problem and decided to try it.
As user root (in the filesystem, redhat7.2), i created the dir ~/dumps
with 777 permissions and have run 
root@cartman:~# mysqldump -uroot -p --tab ~/dumps/ test 
(root mysqluser has FILE permissions). It gave me the same error. 

Then i tried with a common filesystem user (dsoares):
dsoares@cartman:~$ mysqldump -uroot -p --tab ~/dumps/ test 

And it worked!
I went to see my /root permissions and it was:
dsoares@cartman:~$ ll -d /root/
drwxr-x---   31 root     root         4096 Jul 16 11:09 /root/

So the problem was there! mysql user doesn't have permissions to access
/root directory. Maybe this is your problem.

(also as root i tried with /tmp/dumps directory, 777 permissions, and it
worked.)

-- 
Diana Soares

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to