Hi Everyone
This should be quick and simple, but after researching on Google quite a bit I am still
stumped. I am mostly newbie with: server admin, CLI, MySQL.
I am developing my PHP site locally, and now need to move some new MySQL tables from my
local dev setup to the remote testing site. First step for me is just to dump the tables,
one at a time.
I successfully login to my local MySQL like so:
Govind% /usr/local/mysql/bin/mysql -uroot
but while in this dir (and NOT logged into MySQL):
/usr/local/mysql/bin
...when I try this:
mysqldump -uroot -p myDBname myTableName > myTestDumpedTable.sql
..then I keep getting this:
myTestDumpedTable.sql: Permission denied.
Same result if I do any variation on that (try to dump the whole db, drop the '-p', etc.)
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
...which is odd because it does produce a zero-KB file named "myTestDumpedTable.sql" in
that dir.
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...
and again a zero-KB file named "myTestDumpedTable.sql", in ~/
I am embarrassed as I am sure this is going to be incredibly simple, or just reveal a
gaping (basic) hole in my knowledge. .. but I would appreciate any help ;-)
[1]
http://stackoverflow.com/questions/8663454/why-does-basic-mysqldump-on-db-table-fail-with-permission-denied
Thanks
-Govinda
| Thread |
|---|
| • why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Govinda | 29 Dec |
| • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB file | Andy Wallace | 29 Dec |
| • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB file | Reindl Harald | 29 Dec |
| • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Govinda | 29 Dec |
| • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB file | Reindl Harald | 29 Dec |
| • Re: (off topic) why PATH | hsv | 1 Jan |
| • Re: (off topic) why PATH | Reindl Harald | 1 Jan |
| • Re: (off topic) why PATH | Claudio Nanni | 1 Jan |
| • Re: (off topic) why PATH | Reindl Harald | 1 Jan |
| • Re: (off topic) why PATH | Johan De Meersman | 1 Jan |
| • Re: (off topic) why PATH | Claudio Nanni | 1 Jan |
| • Re: (off topic) why PATH | Reindl Harald | 1 Jan |
| • Re: (off topic) why PATH | Claudio Nanni | 1 Jan |
| • Re: (off topic) why PATH | Reindl Harald | 1 Jan |
| • Re: (off topic) why PATH | Reindl Harald | 1 Jan |
| • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Jan Steinman | 31 Dec |
| • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB file | Reindl Harald | 31 Dec |
| • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Govinda | 1 Jan |
| • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Jan Steinman | 2 Jan |
| • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Govinda | 3 Jan |
| • Re: why does basic MySQLdump on db table fail with "Permissiondenied", or else it creates a zero KB file | hsv | 4 Jan |
| • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | Govinda | 4 Jan |
| • Re: (off topic) why PATH | Jan Steinman | 4 Jan |
| • Re: (off topic) why PATH | Reindl Harald | 4 Jan |