mysql start

eoghan eoghanj at gmail.com
Sun Jan 7 12:16:24 PST 2007


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



More information about the macports-users mailing list