Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) while trying to install Application in Website & Domains

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:51:10 UTC

Modified:

2017-02-17 15:53:45 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) while trying to install Application in Website & Domains

Symptoms

Installation of application in Plesk > Domains > example.com > Website & Settings > Applications > Install application fails with the following error:

    ODBC error #08S01: [unixODBC][MySQL][ODBC 5.3(w) Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

File aps_php.php
Line 12519
Type Exception

Cause

System tries to establish connection with /tmp/mysql.sock instead of /var/lib/mysql/mysql.sock .

Resolution

  1. Check the link:

    # ls -ld /tmp/mysql.sock
    ls: cannot access /tmp/mysql.sock: No such file or directory
  2. Create the link:

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
Have more questions? Submit a request
Please sign in to leave a comment.