views:

18

answers:

1

I'm trying to backup a MySQL database:

$ mysqldump -u ruby -p idm_production > /home/username/idm_backup_2010_10_23.sql

Enter password: mysqldump: mysqldump: Couldn't execute 'show fields from arguments': Can't create/write to file '/tmp/#sql_721_0.MYI' (Errcode: 13) (1)

However I don't seem to have permission to write the the /tmp Is there a way I can define the path to output the backup?

A: 

Hi Bryan

What you are doing is write,

If you dont have permission try

1 - with sudo

make your user sudo

sudo -su mysqldump -u ruby -p idm_production > /home/username/idm_backup_2010_10_23.sql

or else change the path

in this line you have already defined the path home/username/

so an example output would be

mysqldump -u ruby -p idm_production > /backup.sql

cheers

sameera

sameera207