Mysql change root password
Mysql administrator account is the "root" account. As in Linux this account has all privileges, writing and reading all the databases in MySql server, changing running parameters of the server and so on. It is a security safeguard to keep this password as long and complex as possible (to include upper and lower characters, digits and SHIFT+Numerical keys.
Changing MySql root account password:
To change mysql root password, use administrator account, usually root, and run the following queries:
Code:
mysql> update mysql.user set password=password(’NEW PASSWORD’) where user=‘root’;
mysql> flush privileges;
The first mysql query will update the password field in the "user" table in "mysql" database belonging to "root" row and the second query will make the mysql server aware of the change immediately, instead of restarting the server.
Source:
https://vpsie.com/securing-mysql-database-shared-hosting-environment/