ispcsrv failed connections to MySQL database

Discussion in 'Installation/Configuration' started by Sharone, Apr 10, 2021.

  1. Sharone

    Sharone Member

    Hi everyone,
    I'm having a hard time solving this error after running php -q update.php. One of the dedicated slaves run into hardware error and I had to reinstall ISPConfig 3.1.15p3 on Ubuntu 18.04.5. I have tried to manually update the authentication string using the string from /usr/local/ispconfig/server/lib/config.inc.php for the respective slave on phpmyadmin on the master database but alas. Any help/pointers would be highly appreciated.
    Code:
    root@mail-20:~# /usr/local/ispconfig/server/server.sh
    10.04.2021-22:47 - WARNING - There is already a lockfile set, but no process running with this pid (23967). Continuing.
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedZugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!PHP Fatal error:  Uncaught Error: Call to a member function testConnection() on boolean in /usr/local/ispconfig/server/server.php:64
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/server/server.php on line 64
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv2'@'mail-20.srv.mtn.co.ug' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedZugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!root@mail-20:~#
    
     
  2. Sharone

    Sharone Member

    I decided to uninstall and reinstall ISPConfig. Managed to clear those errors. Server is now able to send mail but not able to receive mail so I'll post another thread for that.
     
  3. Lorisg91

    Lorisg91 New Member

    Hello everyone,
    I'm facing the same issue after having changed the IP address of a slave server :

    Code:
    [root@mx1 ~]# /usr/local/ispconfig/server/server.sh
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv10'@'ip247.ip-X-X-X.eu' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    I have already changed the IP in the "user" table for the user ispcsrv10 on the master server.
    Any help would be highly appreciated :)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    That's only a small part of the settings of a MySQL user, MySQL users can consist of records in many different tables. Do not edit it in the user table directly, use e.g. the user editor in phpmyadmin to change the IP as it will correctly change all related tables. So the best is, you undo your change in the user table, and then change it again, but this time use the MySQL user editor in phpmyadmin and then flush privileges. In addition to that, don't forget to change the hosts file on master and slave server.
     
  5. Lorisg91

    Lorisg91 New Member

    Thank you Till, it worked I don't have the errors anymore, but my changes in queue on the master are still stuck.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  7. Lorisg91

    Lorisg91 New Member

    Hello Taleman,
    Thank you for your answer, I followed your instructions but it doesn't fix the problem :
    Code:
    [root@mx1 ~]# /usr/local/ispconfig/server/server.sh
    14.11.2021-22:15 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    14.11.2021-22:15 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished server.php.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did you run the server.sh on the slave that has the job items stuck in the queue?
     
  9. Lorisg91

    Lorisg91 New Member

    Yes mx1 is the slave server where the 7 jobs are stuck.
     
  10. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    The server for which you showed debug output doesn't think it has any jobs stuck. Maybe you have a mixup in server ids (eg. jobs queued for a server which no longer exists?) or inconsistency in the server.updated counter (so the server is looking for a job with a higher id number and ignores the existing jobs). Examine the sys_datalog table (on your master server) to verify the server id and compare datalog_id to the server.updated counter for mx1.
     

Share This Page