In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "Linux system how to change the mysql password", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux system how to change the mysql password" this article.
First, the password method of the root with the original mysql: outside the mysql system, use mysqladmin
1 mysqladmin-u root-p password "test123" 2 Enter password: [enter the original password] method 2: log in to the mysql system
1 mysql-uroot-p 2 Enter password: [enter the original password] 3 mysql > use mysql; 4 mysql > update user set password=passworD ("test") where user='root'; 5 mysql > exit; Note: if the Mysql version is 5.7 or above, the update statement is changed as follows:
1 mysql > update user set authentication_string=passworD ("test") where user='root'; 2. Forget the root password of the original mysql. Method 3: first get the root permission of the operating system, and then kill the Mysql service or manually stop it. Here I recommend using manual stop.
1 service mysql stop and then execute
1 mysqld_safe-- skip-grant-tables & &, which means that if you run in the background and no longer run in the background, then open another terminal.
Then log in to MySQL to change the password.
1 mysql 2 mysql > use mysql; 3 mysql > UPDATE user SET password=password ("test123") WHERE user='root'; 4 mysql > exit; Note: if the version of Mysql is 5.7 or above, the update statement is as follows:
1 mysql > update user set authentication_string=passworD ("test") where user='root'; is all the contents of this article "how to change mysql password in Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.