Cannot login Plesk: Unable to connect to database: mysql_connect()

Created:

2016-11-16 12:59:48 UTC

Modified:

2017-04-24 11:32:42 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot login Plesk: Unable to connect to database: mysql_connect()

Applicable to:

  • Plesk 11.0 for Linux

Symptoms

The following error appears on attempt to log into Plesk:

ERROR: PleskFatalException
Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: No such file or directory

0: common_func.php3:153
psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: No such file or directory')
1: auth.php3:116

Cause

There is skip-grant-tables directive set in my.cnf MySQL configuration file.

Resolution

  1. Open my.cnf in text editor and comment/remove skip-grant-tables directive:
    # vi /etc/my.cnf
    # grep skip-grant-tables /etc/my.cnf
    #
    1. Restart mysqld service to apply changes:

      /etc/init.d/mysqld restart

      Stopping mysqld: [ OK ]Starting mysqld: [ OK ]

Have more questions? Submit a request
Please sign in to leave a comment.