If you are in the situation where you want to Change the mysql root password to Linux, from this tutorial you learn step by step how you can do this from SSH (Secure Shell).
This shit is useful when you forgot the user's password “root” For MySQL and you can no longer manage the databases.
After installing MySQL server pe Linux, FreeBSD, OpenBSD, etc UNIX, the first thing you should do is to set a passwordstrong for the user “root“.
This user “vine” Once with MySQL, he has no connection with the user “root” al serverto. Many beginners try to connect to mysql with the user “root“, using the server / system password, and of course the answer is “Access Denied“.
How to change mysql root password to Linux (SSH)
You authenticate through SSH and execute your order “mysqladmin” To set the user's password “root” of the mysql server.
mysqladmin -u root password NEW_PASSWORD
Using the same order you can change the passwords and other SQL users. Change Root with the username for which you want to change your password.
To change mysql's root password in Linux, the comeda executed will be as follows:
mysqladmin -u root -p old_password password new_password
In the above example is the command to change the user's password root. If you want to change the password of a user, the command line changes a little.
mysqladmin -u user_name -p oldpass password newpass
Changing passwords will be done immediately, without the need for other orders or settings.