issues running mysql, mysql5?

Ryan Schmidt ryandesign at macports.org
Sat Mar 31 15:58:01 PDT 2007


On Mar 31, 2007, at 11:57, Chris Drackett wrote:

> I have installed mysql and mysql5 using macports.. I used to have  
> it installed pre-macports, but that install didn't seem to work  
> with the things (like python) that I recently installed via  
> macports. Here is the message I am getting when I try to run mysql5  
> (which i assume is the same as mysql?)
>
> Hobbes:~ cwd$ mysql5
> ERROR 2002 (HY000): Can't connect to local MySQL server through  
> socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
>
> and if I try and run mysql, it can't find it, so I try and activate  
> using port:
>
> Hobbes:~ cwd$ port activate mysql
> --->  Activating mysql
> Error: port activate failed: Image error: /opt/local/share/man/man1/ 
> mysql.1.gz is being used by the active mysql5 port.  Please  
> deactivate this port first, or use the -f flag to force the  
> activation.
>
> I am new to this, and have no idea what is going on :)

The port "mysql" is MySQL version 3.23.58. (Discover that with "port  
info mysql".) That's ancient. You probably don't want it. Uninstall  
it. "sudo port uninstall mysql".

Can't connect to the socket? Ok. Is your MySQL 5 server running?  
Check the list of running processes. I use "ps auxww | grep mysql".  
If you see more than just the grep process, MySQL should be running.  
If it's not... Did you start your MySQL 5 server? Did you even  
install your MySQL 5 server? To get it, you need to have run "sudo  
port install mysql5 +server". If you instead just ran "sudo port  
install mysql5" without specifying the +server variant, then you  
don't have the server. Uninstall the nonserver version ("sudo port  
uninstall mysql5") and reinstall it with the +server variant. When  
it's done, it'll print out a command that you can run to activate the  
launch daemon so that your MySQL 5 server is running. Then you should  
be able to connect to its socket.





More information about the macports-users mailing list