Hi 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? Thanks Eoghan
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.
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.
Hi Ryan I installed mysql with php... sudo port -v install php5 +apache2 +mysql5 So I assume I havent installed the client... tried that install you have above but it gives me an error ---> Fetching mysql5 ---> Verifying checksum(s) for mysql5 ---> Extracting mysql5 ---> Configuring mysql5 ---> Building mysql5 with target all ---> Staging mysql5 into destroot ---> Creating launchd control script ########################################################### # A startup item has been generated that will aid in # starting mysql5 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.mysql5.plist ########################################################### ---> Installing mysql5 5.0.27_1+darwin_8+server ****************************************************** * In order to setup the database, you might want to run * sudo -u mysql mysql_install_db5 * if this is a new install ****************************************************** ---> Activating mysql5 5.0.27_1+darwin_8+server Error: Target com.apple.activate returned: Image error: Another version of mysql5 (5.0.27_1+darwin_8) is already active. Error: Status 1 encountered during processing. Do I need to remove mysql5 and start again or is there a way to install the server? Thanks Eoghan
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
On Jan 7, 2007, at 14:16, eoghan wrote:
I installed mysql with php... sudo port -v install php5 +apache2 +mysql5 So I assume I havent installed the client...
You *have* installed the client. Asking for php5 +mysql5 adds a dependency on mysql5. If you haven't already installed the mysql5 port, it is installed for you, but without any variants. You should have first installed mysql5 with the +server variant if that's what you wanted (and it sounds like it is). (Scroll down for more.)
tried that install you have above but it gives me an error ---> Fetching mysql5 ---> Verifying checksum(s) for mysql5 ---> Extracting mysql5 ---> Configuring mysql5 ---> Building mysql5 with target all ---> Staging mysql5 into destroot ---> Creating launchd control script ########################################################### # A startup item has been generated that will aid in # starting mysql5 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.mysql5.plist ########################################################### ---> Installing mysql5 5.0.27_1+darwin_8+server ****************************************************** * In order to setup the database, you might want to run * sudo -u mysql mysql_install_db5 * if this is a new install ****************************************************** ---> Activating mysql5 5.0.27_1+darwin_8+server Error: Target com.apple.activate returned: Image error: Another version of mysql5 (5.0.27_1+darwin_8) is already active. Error: Status 1 encountered during processing.
Do I need to remove mysql5 and start again or is there a way to install the server?
On Jan 7, 2007, at 14:19, eoghan wrote:
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...
You need to remove the non-server version: sudo port uninstall mysql5 @5.0.27_1+darwin_8 Now you will only have the +server version installed (but not active) so you need to activate it: sudo port activate mysql5 Then you need to install the initial databases and then start mysqld as per my earlier message.
On 7 Jan 2007, at 20:34, Ryan Schmidt wrote:
On Jan 7, 2007, at 14:16, eoghan wrote:
I installed mysql with php... sudo port -v install php5 +apache2 +mysql5 So I assume I havent installed the client...
You *have* installed the client. Asking for php5 +mysql5 adds a dependency on mysql5. If you haven't already installed the mysql5 port, it is installed for you, but without any variants. You should have first installed mysql5 with the +server variant if that's what you wanted (and it sounds like it is).
(Scroll down for more.)
tried that install you have above but it gives me an error ---> Fetching mysql5 ---> Verifying checksum(s) for mysql5 ---> Extracting mysql5 ---> Configuring mysql5 ---> Building mysql5 with target all ---> Staging mysql5 into destroot ---> Creating launchd control script ########################################################### # A startup item has been generated that will aid in # starting mysql5 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.mysql5.plist ########################################################### ---> Installing mysql5 5.0.27_1+darwin_8+server ****************************************************** * In order to setup the database, you might want to run * sudo -u mysql mysql_install_db5 * if this is a new install ****************************************************** ---> Activating mysql5 5.0.27_1+darwin_8+server Error: Target com.apple.activate returned: Image error: Another version of mysql5 (5.0.27_1+darwin_8) is already active. Error: Status 1 encountered during processing.
Do I need to remove mysql5 and start again or is there a way to install the server?
On Jan 7, 2007, at 14:19, eoghan wrote:
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...
You need to remove the non-server version:
sudo port uninstall mysql5 @5.0.27_1+darwin_8
Now you will only have the +server version installed (but not active) so you need to activate it:
sudo port activate mysql5
Then you need to install the initial databases and then start mysqld as per my earlier message.
Thanks for you help Ryan... I will give this a go. Eoghan
Le 07-01-07 à 13:55, Ryan Schmidt a écrit :
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.
BTW, I just installed Cacti, who install MySQL 5, from the ports and "mysql_install_db" have some permissions problems since the mysql user can't write to /opt/local/var/db/. I have to change the permissions to get it to work.
Pascal Robert <probert@os.ca> on Wednesday, February 14, 2007 at 6:57 AM -0800 wrote:
Le 07-01-07 à 13:55, Ryan Schmidt a écrit :
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.
BTW, I just installed Cacti, who install MySQL 5, from the ports and "mysql_install_db" have some permissions problems since the mysql user can't write to /opt/local/var/db/. I have to change the permissions to get it to work.
Hmmn. 'sudo -u mysql mysql_install_db5' to setup mysql5 has always worked for me and I just installed mysql5 on a new box and it worked. What is the permissions and owner on your ${prefix}/var directory? Or perhaps /opt/local/var/db been installed with mysql_install_db before with permissions other than mysql:mysql? Mark
participants (4)
-
eoghan
-
Mark Duling
-
Pascal Robert
-
Ryan Schmidt