Symptoms
- Installation of Plesk micro-updates fails with the message:
[ERROR]Unable to connect to database. System message: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
- phpMyAdmin shows the following error:
The server is not responding (or the local server's socket is not correctly configured).
- Websites using MySQL databases do not work.
- In Plesk > Tools & Settings > Database Servers MySQL server is not connected:
Cause
MySQL service was manually removed from Windows Services.
Resolution
- Connect to the server via RDP.
-
Run the Windows command line and register the service using the command below:
C:>Â “%plesk_dir%mysqlbinmysqld.exe” –install MySQL57 –defaults-file=”C:Program Files (x86)PleskDatabasesMySQLmy.ini”
Note: Path to MySQL configuration file may be different. It is located in
.
%plesk_dir%DatabasesMySQLmy.ini - Start the service:
C:> sc start mysql57
-
Check at Plesk > Tools & Settings > Database Servers that server is connected:
Additional information
Plesk login fails: Unable to connect to database
Plesk is not accessible: No connection could be made because the target machine actively refused it