Linux/Unix Phpmyadmin Access Issue
This short guide try to Troubleshooting Phpmyadmin Access for Unix-like Platforms.
This Issue is manifested also as: “The Local MySQL Server’s Socket Is Not Correctly Configured”
-
How to Quick-Start with Command Line on Linux/Unix:
You Need to be Sure than MySQL is Up and Running:
ps aux | grep mysqld | grep /
and check if it give you an Output
OR Instead.
Check if you are Able to Login from Terminal:
mysql -uMyUser -p
You Need to Insert the Right MySQL User Password…
Example:
mysql -uroot -p
Check if the mysql.sock is in /tmp:
ls /tmp | grep mysql.sock
look if you got an Output Containing a Reference to mysql.sock.Else find where mysql.sock is located:
a) By the Locate commandlocate mysql.sock
(Your locate Database should be Up to Date…)
How to Quick Start with the locate Command
locate Command Quick Startmysqladmin -uroot -p variables | grep mysql.sock
Next select and copy the path to mysql.sock and create a symlink: (You can skip this step and insert directly yourPathTo-mysql.sock on the config.inc.php)sudo ln -s
Example: sudo ln -s /var/mysql/mysql.sock /tmp/mysql.sock 3) Modify config.inc.php in Phpmyadmin directory Change or Insert the following entries:mysql.sock /tmp/mysql.sock $cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
$cfg['Servers'][$i]['user'] = 'yourMySQLUser';
$cfg['Servers'][$i]['password'] = 'yourMySQLPass';
- Latest Restart MySQL and Apache