Wednesday, September 14, 2011

Phpmyadmin The server is not responding (or the local MySQL server's socket is not correctly configured) Mac Linux

This short guide try to Troubleshooting Phpmyadmin Access for Unix-like Platforms
MySQL MySQL MySQL, Phpmyadmin Phpmyadmin Phpmyadmin, MySQL Tutorial,
Phpmyadmin Tutorial, MySQL Phpmyadmin, MySQL Phpmyadmin Tutorials, Phpmyadmin Troubleshooting, Database Database Database, Database Buckup, Database Design, Database Troubleshooting, Linux Linux, Unix Unix, Linux Tutorial, Unix Tutorial, Phpmyadmin Guide, Phpmyadmin Documentation, Orm Database Model, Orm Database


Relax, Take it Easy and Follow Step by Step the Commands and the Instructions...

  1. Open a Terminal Window
  2.  

  3. 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
  4.  

  5. 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.
  6. Else find where mysql.sock is located:

       a) By the Locate command
    locate mysql.sock
       (Your Database should be Up to Date. If you need look at Updatedb)    b) By mysqladmin
    mysqladmin -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 YourPathTo-mysql.sock /tmp/mysql.sock
    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:
    $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';
    

  7. Last Restart MySQL and Apache
HOW to Find Files/Directories/Images on Linux Command Line