To change password in MySQL log in to mysql as root user:
$ mysql -h localhost -u root -p
mysql> UPDATE mysql.user SET Password=PASSWORD(‘new_db_password’) WHERE User=’db_user_name’ AND Host=’db_host’;
mysql> FLUSH PRIVILEGES;
mysql> quit;
web development and system administration of Linux
To change password in MySQL log in to mysql as root user:
$ mysql -h localhost -u root -p
mysql> UPDATE mysql.user SET Password=PASSWORD(‘new_db_password’) WHERE User=’db_user_name’ AND Host=’db_host’;
mysql> FLUSH PRIVILEGES;
mysql> quit;