List:General Discussion« Previous MessageNext Message »
From:Govinda Date:December 29 2011 5:15pm
Subject:why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file
View as plain text  
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 fileGovinda29 Dec
  • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB fileAndy Wallace29 Dec
  • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB fileReindl Harald29 Dec
    • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB fileGovinda29 Dec
      • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB fileReindl Harald29 Dec
        • Re: (off topic) why PATHhsv1 Jan
          • Re: (off topic) why PATHReindl Harald1 Jan
            • Re: (off topic) why PATHClaudio Nanni1 Jan
              • Re: (off topic) why PATHReindl Harald1 Jan
              • Re: (off topic) why PATHJohan De Meersman1 Jan
                • Re: (off topic) why PATHClaudio Nanni1 Jan
                  • Re: (off topic) why PATHReindl Harald1 Jan
                    • Re: (off topic) why PATHClaudio Nanni1 Jan
                      • Re: (off topic) why PATHReindl Harald1 Jan
                • Re: (off topic) why PATHReindl Harald1 Jan
Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB fileJan Steinman31 Dec
  • Re: why does basic MySQLdump on db table fail with "Permission denied",or else it creates a zero KB fileReindl Harald31 Dec
  • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB fileGovinda1 Jan
    • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB fileJan Steinman2 Jan
      • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB fileGovinda3 Jan
        • Re: why does basic MySQLdump on db table fail with "Permissiondenied", or else it creates a zero KB filehsv4 Jan
          • Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB fileGovinda4 Jan
Re: (off topic) why PATHJan Steinman4 Jan
  • Re: (off topic) why PATHReindl Harald4 Jan