i-MSCP Exception Mail Writer - Exception raised

  • Recently I was concerned that my server had been breached, and changed the root password for mysql.Since then I've started receiving a bunch of these emails from i-mscp:


    Code
    1. Dear admin,An exception with the following message has been thrown in file/var/www/imscp/gui/library/iMSCP/Initializer.php (Line: 354):=================================================================Unable to establish the connection to the database. SQL returned:SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost'(using password: YES)Query was:=================================================================Debug backtrace:---------------File: /var/www/imscp/gui/library/iMSCP/Initializer.php (Line: 138)Method: iMSCP_Initializer::_initializeDatabase()File: /var/www/imscp/gui/library/iMSCP/Initializer.php (Line: 95)Method: iMSCP_Initializer::_processAll()File: /var/www/imscp/gui/library/environment.php (Line: 231)Method: iMSCP_Initializer::run()File: /var/www/imscp/gui/library/imscp-lib.php (Line: 148)Function: require_once()File: /var/www/imscp/gui/public/plugins.php (Line: 30)Function: require_once()


    I assume that's because i-mscp needs to login as sql root user? How should I proceed to reauthenticate i-mscp?

  • Hello ;


    You must run the setup script as follow:


    Shell-Script
    1. # perl /var/www/imscp/engine/setup/imscp-setup -dar sql


    Then, when you are asked for the new SQL password, you must enter the new password (the one you have set when you changed the SQL root password).


    [hr]


    For those which want update their root SQL password, the full procedure is as follow:


    1. Update SQL root password:


    Shell-Script
    1. # dpkg-reconfigure percona-server-server-5.6


    Note: Here, this is the percona MySQL server in use. This can differ according the MySQL server you are using (MariaDB, MySQL, Percona), and the version you are using.. To resume, you must not run the command above without think a little bit about what you are doing...


    2. Update SQL root password in imscp.conf file:


    Shell-Script
    1. # perl /var/www/imscp/engine/setup/imscp-setup -dar sql


    Then, when asked, you must enter the same password as defined while running dpkg-reconfigure...


    That all.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • No, you cannot do that because the value of the DATABASE_PASSWORD is the encrypted password.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206