How To Change Koha MySQL Database User Password


            After installing Koha Live CD, MySQL server, we can make connection with the server as a root user by default password(mysqlroot). For security purpose, sometimes we need to change the password for root or any existing user.

In this tutorial, you will learn how you can change the password of any existing MySQL user on Ubuntu.

Open Terminal (Ctrl + T)
Using the following command.
sudo su
Enter your system super user password

mysql -u root -p
To change the password of root user on local server, you have to run the following SQL command. Here, ‘mynewpassword’ is set as new password.
UPDATE mysql.user SET Password=PASSWORD('mynewpassword') WHERE USER='root';
quit;
Again, exit from the server and restart the database server before testing the new password.
sudo service mysql restart
Now, check the new password is working or not for root user.
mysql -u root -p
By following any of the above SQL statements, you can easily change the password of any existing MySQL user.


Post a Comment

1 Comments