| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Andy Wallace | Date: | December 29 2011 5:22pm |
| Subject: | Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file | ||
| View as plain text | |||
I would suggest trying: mysqldump -uroot -p myDBname myTableName > /tmp/myTestDumpedTable.sql Maybe you don't have permission (or space) to write into /usr/local/mysql/bin. That would be an unusual place for such files. On 12/29/11 9:15 AM, Govinda wrote: > 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 -- Andy Wallace iHOUSEweb, Inc. awallace@stripped (866) 645-7700 ext 219 -- There are two ways to build software: Make it so simple that there are obviously no bugs, or make it so complex that there are no obvious bugs.
