problem with mysql 5 install and configuration

Ryan Schmidt ryandesign at macports.org
Tue Jan 17 18:29:46 PST 2012


On Jan 17, 2012, at 12:52, Érico wrote:

> both work in command line : 
> 
> step 1 => $ mysql5 -u root --socket=/opt/local/var/run/mysql5/mysqld.sock

You should not need to inform it where the socket is. It should already know. Unless you changed it in your my.cnf.


> step 2 => $ mysql5 -u root -p
> 
> I am trying now to use phpmyadmin on it and I am getting the following : 
> 
> Error
> #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

If you are using phpmyadmin installed by MacPorts, along with MacPorts apache2, php5 and php5-mysql, and php5-mysql's default variant +mysqlnd, did you follow the instructions the php5-mysql port printed when it was installed?

--->  Computing dependencies for php5-mysql
--->  Fetching php5-mysql
--->  Verifying checksum(s) for php5-mysql
--->  Extracting php5-mysql
--->  Configuring php5-mysql
--->  Building php5-mysql
--->  Staging php5-mysql into destroot
--->  Installing php5-mysql @5.3.9_0+mysqlnd
To use mysqlnd with a local MySQL server, edit /opt/local/etc/php5/php.ini and set
mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket
to /opt/local/var/run/mysql5/mysqld.sock
--->  Activating php5-mysql @5.3.9_0+mysqlnd
--->  Cleaning php5-mysql


> do I need to set some other parameter on : 
> sudo -u _mysql mysqld_safe5 & 
> 
> ?
> 
> before running step 1 or 2 ....

I don't think so. But now that you have the MySQL server starting properly, you should no longer be using mysqld_safe5 directly; instead, run "sudo port load mysql5-server" to let launchd manage starting the server for you.






More information about the macports-users mailing list