Unable to connect to MySQL: Can't connect twice. Already connected

Created:

2016-11-16 13:14:22 UTC

Modified:

2017-08-16 18:34:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to connect to MySQL: Can't connect twice. Already connected

Applicable to:

  • Plesk 11.x for Windows

Symptoms

Unable to connect to MySQL, the following error can be observed in the EventViewer:

Failed to connect to database: Can't connect twice. Already connected
at (MySQLDatabaseProvider::connect line 199)
at Check connection to Plesk database(plesksrv::StartupHandlerThread::checkPrerequisites line 432)
Execute file name: C:\\Program Files\\Parallels\\Plesk\\admin\\bin\\plesksrv.exe

Cause

The HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config\\MySQL_DB_PORT is absent.

C:\\> reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config" | findstr  MySQL_DB_PORT

Resolution

  1. Open Registry Editor (Run > regedit.exe)

  2. Locate HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config

  3. Add new String Value:

    Value name: MySQL_DB_PORT
    Value data: 8306

To verify:

C:\\Users\\Administrator>reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config" | findstr  MySQL_DB_PORT
MySQL_DB_PORT REG_SZ 8306

The following KB article can be helpful also: https://kb.plesk.com/en/121386

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