User Tools

Site Tools


change_db_password

This is an old revision of the document!


How to change i-MSCP database SQL user password?

If you know the old password

1. Set a new password to the existent SQL user

 # mysql -u root -p
 > UPDATE mysql.user SET Password=PASSWORD('cleartext password') WHERE User='root' AND Host='localhost';
 > FLUSH PRIVILEGES;
 > quit;

Note: Here, assumption is made that the i-MSCP SQL user is the SQL root user (default). Another way is to run the mysql_secure_installation script as provided with the MySQL server.

2. Inform i-MSCP about new password

 # perl /var/www/imscp/engine/setup/imscp-setup

Then, you will be asked again about i-MSCP SQL username and password.

If you do not know the old password

1. Set a new password to the existent SQL user

 # /etc/init.d/mysql stop
 # /usr/bin/mysqld_safe --skip-grant-tables &
 # mysql -u root
 > UPDATE mysql.user SET Password=PASSWORD('PASSWORD') WHERE User='root' AND Host='localhost';
 > FLUSH PRIVILEGES;
 > quit;
 # /etc/init.d/mysql start

2. Inform i-MSCP about new password

 # perl /var/www/imscp/engine/setup/imscp-setup

Then, you will be asked again about i-MSCP SQL username and password.

/var/www/virtual/i-mscp.net/wiki/htdocs/data/attic/change_db_password.1355565183.txt.gz · Last modified: 2012/12/15 09:53 by nuxwin