On 7 Jan 2007, at 18:55, Ryan Schmidt wrote:
On Jan 7, 2007, at 09:14, eoghan wrote:
Im trying to start mysql (version 5.0.27) using: $sudo /opt/local/libexec/mysqld --user=mysql Im getting the follwing error: 070107 15:11:45 [Warning] Can't create test file /opt/local/var/db/ mysql5/eoghan-js-Computer.lower-test 070107 15:11:45 [Warning] Can't create test file /opt/local/var/db/ mysql5/eoghan-js-Computer.lower-test /opt/local/libexec/mysqld: Can't change dir to '/opt/local/var/db/ mysql5/' (Errcode: 2) 070107 15:11:45 [ERROR] Aborting
070107 15:11:45 [Note] /opt/local/libexec/mysqld: Shutdown complete
Could someone help me on this please?
It sounds like the directory /opt/local/var/db/mysql5 does not exist. Did you set up the initial databases? It sounds like you didn't.
Did you "sudo port install mysql5" or "sudo port install mysql5 +server"? You should do the latter. If you had, you would have seen the following message which explains how to install the initial databases:
****************************************************** * In order to setup the database, you might want to run * sudo -u mysql mysql_install_db5 * if this is a new install ******************************************************
Run mysql_install_db5 as shown above.
By using the +server variant, you will also have a LaunchDaemon script which you should use instead of calling mysqld directly when you want to start or stop mysqld [1]. To start mysqld now and to have it start automatically when you reboot your Mac:
sudo launchctl load -w /Library/LaunchDaemons/ org.macports.mysql5.plist
To stop mysqld now and prevent it from starting at subsequent restarts:
sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.mysql5.plist
[1] This assumes you're using Mac OS X 10.4.0 or later. LaunchDaemon is not available on earlier versions of Mac OS X.
Apologies, but as a follow up... when i run port installed i can see server: mysql5 @5.0.27_1+darwin_8 (active) mysql5 @5.0.27_1+darwin_8+server though its not listed as active... Eoghan