phpMyAdmin error: The local MySQL server’s socket is not correctly configured.

27 06 2008

These error occurs when mysql socket is not configured properly. PhpMyAdmin tries to fetch the mysql.sock file from /tmp. By default the mysql.sock file is /var/lib/mysql/mysql.sock. Thus phpMyAdmin won’t be able to fetch the sock file. You can use the following steps to fix the issue.

Locate the socket file of MySQL(mysql.sock).

Normally it would be under the following location:

/var/lib/mysql/mysql.sock

Create a symlink of the file to /tmp

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock


Actions

Information

One response

7 09 2009
Jacob

Better yet, edit /etc/my.cnf (which won’t exist at first) and add the following four lines:

[client]
socket = /var/mysql/mysql.sock
[mysqld]
socket = /var/mysql/mysql.sock

Be sure to make /var/mysql/ owned by “_mysql” first, so mysql can write its socket there.

This is a good place to put it, because the built-in PHP has been compiled to look for that path.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.