Problems installing MySQL 5.1 on OS X 10.5.6 client

anuraagt

Registered
Hi there,

I installed Apache, PHP and MySQL following the instructions on http://www.macosxhints.com/article.php?story=20071030153912813. Apache and PHP came up just fine.

I then followed the instructions at http://dev.mysql.com/doc/refman/5.1/en/unix-post-installation.html for the post-install process. The data directory had already been created on my machine, so I assumed that step 2 of the post-install process was not needed.

Step three (bin/mysqld_safe --user=mysql &) failed with the following error:

[1] 400
anuraag-tiwaris-macbook-pro:mysql anuraagt$ 090312 01:08:01 mysqld_safe Logging to '/usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.err'.
touch: /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.err: Permission denied
chown: /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.err: Permission denied
090312 01:08:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
bin/mysqld_safe: line 96: /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.err: Permission denied
rm: /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.pid: Permission denied
bin/mysqld_safe: line 133: /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.err: Permission denied
090312 01:08:01 mysqld_safe mysqld from pid file /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.pid ended
bin/mysqld_safe: line 96: /usr/local/mysql/data/anuraag-tiwaris-macbook-pro.local.err: Permission denied

I'm new to UNIX and the Mac OS, so any help on what this is due to would be greatly appreciated! Thanks,

-anuraag
 
You need to launch the mysql daemon as root/superuser, so prefix your mysql launch command with "sudo."

Code:
$ sudo bin/mysqld_safe --user=mysql &
 
That was the trick. Running the following two commands in sequence set the right permissions:

sudo scripts/mysql_install_db --user=mysql

sudo bin/mysqld_safe --user=mysql &
 
Back
Top