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 :)
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.
when I try and run it i get the following: Hobbes:~ cwd$ ps auxww | grep mysql cwd 4715 1.0 -0.0 27372 428 p3 S+ 6:05PM 0:00.00 grep mysql mysql 4674 0.0 -0.5 39940 10444 ?? SNs 6:04PM 0:00.21 /System/Library/Frameworks/CoreServices.framework/Frameworks/ Metadata.framework/Versions/A/Support/mdimportserver and if I try and start the server I get: Hobbes:~ cwd$ /opt/local/share/mysql5/mysql/mysql.server start Starting MySQL/opt/local/share/mysql5/mysql/mysql.server: line 151: kill: (4732) - No such process ERROR! any ideas :) On Mar 31, 2007, at 5:58 PM, Ryan Schmidt wrote:
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.
[resending because I accidentally used an unsubscribed address] Chris Drackett wrote:
I have installed mysql and mysql5 using macports..
Why did you install both mysql and mysql5? The port named "mysql" is the old 3.23.x branch and "mysql5" is the newest 5.0.x branch. So I think you only wanted to install the latter.
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?)
No, definitely not. The binaries got the version number as postfix to make them distinguishable. The mysql5 binary is the *client*. In order to access the server, you have to start it before. Use /opt/local/share/mysql5/mysql/mysql.server start to get it running. Now you can use the client to access it. How to stop it again should be trivial ;-) HTH, Rainer
On Mar 31, 2007, at 18:08, Chris Drackett wrote:
when I try and run it i get the following:
Hobbes:~ cwd$ ps auxww | grep mysql cwd 4715 1.0 -0.0 27372 428 p3 S+ 6:05PM 0:00.00 grep mysql mysql 4674 0.0 -0.5 39940 10444 ?? SNs 6:04PM 0:00.21 /System/Library/Frameworks/CoreServices.framework/ Frameworks/Metadata.framework/Versions/A/Support/mdimportserver
Hmm. I wonder why the mysql user is running Mac OS X's metadata import server. In any case, it looks like mysql is not running.
and if I try and start the server I get:
Hobbes:~ cwd$ /opt/local/share/mysql5/mysql/mysql.server start Starting MySQL/opt/local/share/mysql5/mysql/mysql.server: line 151: kill: (4732) - No such process ERROR!
Well, the command you should use to start the mysql5 server now, and have it start every time you boot your computer, is: sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist The command to stop the mysql5 server now, and prevent it from starting when you boot your computer, is: sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.mysql5.plist Before this will work properly, though, you will probably have to initialize the mysql5 databases. The way to do that is: sudo -u mysql mysql_install_db5 If you still can't start the mysql5 server after that, see if anything useful is in the error log. The error log is in /opt/local/ var/db/mysql5 in a file whose name ends with ".err", for example "localhost.err".
participants (3)
-
Chris Drackett
-
Rainer Müller
-
Ryan Schmidt