Am 29.12.2011 18:15, schrieb Govinda:
> ...when I try this:
> mysqldump -uroot -p myDBname myTableName > myTestDumpedTable.sql
> 
> ..then I keep getting this:
> myTestDumpedTable.sql: Permission denied.

your unix-user has no write permissions to myTestDumpedTable.sql
this has nothing to do wirh mysql

what about considering use a target-folder your user owns
and generally use a full-qualified path for the dump-file
instead spit it randomly in the folder where you are

> Same result if I do any variation on that (try to dump the whole db, drop the 
> '-p', etc.)

because no parameter can change your folder-pmermissions

> On StackOverflow I asked this question [1], and replies there led me to 
> trying being logged in as root user, and then (the same):
> mysqldump -uroot -p myDBname myTableName > myTestDumpedTable.sql
> 
> produces:
> sh: mysqldump: command not found

"mysqldump" is not in the path of your root-user
change the PATH-variable or call mysqldump full-qualified

> ...which is odd because it does produce a zero-KB file named 
> "myTestDumpedTable.sql" in that dir. 

it is not odd it is normal that "> myTestDumpedTable.sql" creates the
file since what you are doing is output redirection

> So then I try (in Mac OS X Terminal, while logged in as me (not root)):
> mysqldump -uroot -p myDBname myTableName > ~/myTestDumpedTable.sql
> ...and again it produces:
> sh: mysqldump: command not found..

that is because Mac OSX is missing a package-managment and so you need
a little knowledge about your OS to fix the PATH or you have to use
full-qualified calls or configure/install your software to locations
which are already in the path

"which mysqldump" as normal user wil tell you where it is really
[harry@srv-rhsoft:~]$ which mysqldump
/usr/bin/mysqldump


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to