At 21:12 -0600 1/31/03, Gary Reimer wrote:
>I'm a new mysql user running on OS X. I have set up a test database and am
>trying to use mysqldump to create a backup. However here is what happens:
>[h24-85-217-157:/usr/local/bin] garydr% mysqldump -h localhost -u root
>bpw_db_backup.sql: Permission denied.
>I have no idea what's going on.
You're trying to run the command in the /usr/local/bin directory, and you
won't have permission to write in that directory unless you're root.
Run the command in a directory you own. On to the second problem:
> I understand that this command should create
>an sql file with my database structure and data in it. Sounds good. However,
>I can't run the command.
>I read in a manual I could get help as follows:
>[h24-85-217-157:/usr/local/bin] garydr% mysqldump --help
>mysqldump: Command not found.
>But as you can see, it doesn't work.
This indicates that you don't have /usr/local/bin in your PATH
setting (the variable that determines the directories in which your
shell looks for commands). Add the directory to your PATH. If you
don't know how, see "What To Do if mysql Cannot be Found":
The information in this document also applies to mysqldump
>Can anyone help me, or direct me to a good source of information related to
>running mysql on OS X? For example, I can't figure out where in my system
>the mysql database files are located.
mysql> SHOW VARIABLES LIKE 'data_dir';
> If I could, at least I could just make
>backup copies to CD.
>Any help would be greatly appreciated.
>Thanks in advance,
>Winnipeg MB Canada