2 Ways to Change or Update Mysql Root Password
2 Ways to Change or Update Mysql Root Password
I worked in a technical company and always found that the client lost or forgot the mysql password. Therefore, I would like to share the steps to change or update the mysql password.
Solution 1)
Forgot your password? Want to change your mysql root password under under Linux, FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session?
After the operation system installed completely, there are null for mysql root password. Therefore, you need to set the root password for first time by typing:
# mysqladmin -u root password YOURNEWPASSWORD
Sometimes, you need to change or update your mysql root password, then you could use this command:
# mysqladmin -u root -p'YOURNEWPASSWORD' password 'YURNEWPASSWORD'
But, How can we change dedicate use password?
e.g you wan to change mysql password for user techutter
# mysqladmin -u techutter -p 'TECHUTTEROLDPASSWORD' password 'TECHUTTERNEWPASSWORD'
Solution 2)
The mysql user, passwd and permission information stored in mysql database.
Therefore, you can change the informaion by update the mysql table:
- First, Login to the mysql with root:
#mysql -u root -p
- Second, Use the mysql database:
mysql> use mysql;
- Third, For example, you want to change techutter password
mysql> update user set password=PASSWORD("TECHUTTERNEWPASSWORD") where User='techutter';
- Finally, type the following command to Reload privileges and quit the mysql server:
mysql> flush privileges;
mysql> quit
TESTING:
Now you can use the new password for the techtter user to login the mysql for testing:
mysql -u techutter -p TECHUTTERNEWPASSWORD
Do you want extra technical tips? If Yes! Then,Click Here to visit my website "Techutter " now
Webroot® Antivirus with Spy Sweeper - Editors Choice for Standalone Antispyware The roots of an indie clothing store go back many years The Successful Category Manager How Important Are Orchid Roots Avoiding Fda 483 Observations By Identifying The Root Cause Of Deviations - Webinar By Gcpanel 5 Grass Roots Content Development Strategies 4x4 News: The Land Rover Series III Defends its Rural Roots Is it Time for a Root Canal? Some Myths About Root Canals Important Category Of Gifts Tree Roots and Sewer Pipes Tree Surgery, Arboriculture, Specialist Roots And Tools Remove Rootkit.Win32.Pakes.ys - How to Get Rid of This Annoying Virus Quickly and Easily
www.yloan.com
guest:
register
|
login
|
search
IP(216.73.216.39) California / Anaheim
Processed in 0.016959 second(s), 7 queries
,
Gzip enabled
, discuz 5.5 through PHP 8.3.9 ,
debug code: 52 , 1969, 251,