Article ID: 117118, created on Sep 5, 2013, last review on Oct 12, 2016

  • Applies to:
  • Plesk 11.5 for Linux
  • Plesk for Windows
  • Virtuozzo containers for Windows 4.6

Symptoms

  1. Plesk login page is showing an error:

    ERROR: PleskMainDBException
    No connection could be made because the target machine actively refused it.
    
    0: common_func.php3:637
            reconnect()
    1: common_func.php3:600
            db_connect()
    2: auth.php3:134
    
  2. The following error appears:

    [panel]: Error during product key mode determination, details: No connection could be made because the target machine actively refused it. ; 
    trace: 
    #0 C:\Program Files (x86)\Parallels\Plesk\admin\plib\db.php(411): reconnect() 
    #1 C:\Program Files (x86)\Parallels\Plesk\admin\plib\functions.php(2791): db_connect() 
    #2 C:\Program Files (x86)\Parallels\Plesk\admin\plib\functions.php(2808): isPpaKeyRequired() 
    #3 C:\Program Files (x86)\Parallels\Plesk\admin\plib\common_func.php3(7): require_once('C:\Program File...') 
    #4 C:\Program Files (x86)\Parallels\Plesk\admin\plib\auth.php(93): require_once('C:\Program File...') 
    #5 {main} ERR (3) [panel]: Unable to get key: error: 
    C:\Program Files (x86)\Parallels\Plesk\admin\repository\lock\repository: cannot create: Permission denied PHP Warning: mysqli::close(): 
    Couldn't fetch mysqli in C:\Program Files (x86)\Parallels\Plesk\admin\plib\db.php on line 491 ERR (3) [panel]: No connection could be made because the target machine actively refused it. : 
    0: db.php:451 reconnect() 
    1: db.php:411 db_connect() 
    2: auth.php:140 PleskMainDBException: No connection could be made because the target machine actively refused it. file: C:\Program Files (x86)\Parallels\Plesk\admin\plib\db.php line: 451 code: 
    

Cause

  • The Plesk MySQL server is stopped
  • MySQL databases are corrupted
  • Incorrect permissions on some Plesk directories (Read-only attribute)
  • Incorrect parameters in configuration file

Resolution

  1. Fix incorrect Plesk SQL Server service configuration or state.

    1.1. Restart Plesk SQL Server service.

    1.2. Make sure that my.ini exists in "%plesk_dir%\MySQL\Data\" and that basedir and datadir parameters have the correct values:

    C:\>findstr dir "%plesk_dir%\Mysql\Data\my.ini"
    basedir=C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL
    datadir=C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL\\Data
    tmpdir=C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL\\Data
    

    1.2. Ensure that all options and extensions specified in my.ini are valid.

  2. If MySQL goes down, again, with error 1067 "The process terminated unexpectedly":

    Check the MySQL error logs in %plesk_dir%\MySQL\Data\<computer_name>.err :

    2.1. If the following error occurs:

    130904 20:23:16  InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    

    This may mean that PSA or another database is broken, or there is inconsistent information in one of the databases. Please see the following articles:

    #124928 MySQL service fails to start: Can't open and lock privilege tables: Incorrect file format 'host' #116591 Plesk is not available: Got error -1 from storage engine

    2.2. The other possible errors in the MySQL error log file:

    Version: '5.5.31'  socket: ''  port: 8306  MySQL Community Server (GPL)
    1 1 1 IInnoDB: We intentionally generate a memory trap.
    InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
    InnoDB: If you get repeated assertion failures or crashes, even
    InnoDB: immediately after the mysqld startup, there may be
    InnoDB: corruption in the InnoDB tablespace. Please refer to
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
    InnoDB: about forcing recovery.
    

    Sometimes, it does not mean the database has been corrupted. Make sure that the files in %plesk_dir%\MySQL\Data\ do not have "Read-only" attribute (sub-directories can have this attribute).

    If the files are read-only, it is needed to to right-click on %plesk_dir%\Plesk\MySQL\Data, go to Properties, un-check "Read-only" attribute and click OK. Then, try to start "Plesk SQL Server" service again.

    2.3 Check Event Viewer logs for errors in Application logs section.

    2.4. In case of the following error, change the innodb_log_file_size value in %plesk_dir%\MySQL\Data\my.ini according to the error. In this case, it is needed to specify the file size as 10M

    InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
    InnoDB: than specified in the .cnf file 0 5242880 bytes!
    
  3. If Plesk shows an error as above in Case 2:

    This means incorrect file permissions on some files are set in %plesk_dir%\admin. It is possible to restore the default permissions using the Plesk Reconfigurator.

    • Run the Plesk Reconfigurator as administrator: %plesk_bin%\reconfigurator.exe
    • Check component and folder permissions > Browse, select C:\Program Files (x86)\Parallels\Plesk\admin and press Check

Search Words

Unable to start plesk sql server

PleskMainDBException

Could not start the MySQL service: Error 1067

#2002 - No connection could be made because the target machine actively refused it. The server is not responding (or the local server's socket is not correctly configured).

ERROR: PleskMainDBException: No connection could be made because the target machine actively refused it. (db.php:435)

HTTP Error 503. The service is unavailable

No connection could be made because the target machine actively refused it.

mysql server is stop error 1067

56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 85a92ca67f2200d36506862eaa6ed6b8 6c20476fe6c3408461ce38cbcab6d03b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8 29d1e90fd304f01e6420fbe60f66f838 01bc4c8cf5b7f01f815a7ada004154a2 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF