In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Mysql password modification method:
1. Use mysqladmin to modify
# mysqladmin-uroot-p password 'newpass'Enter password: note: if it is the first time to change the password, prompt Enter password: enter directly. If you reset the password, prompt Enter password: enter the old password and enter enter.
2. Enter mysql to change your password
Mysql > set password for 'root'@'127.0.0.1' = password (' newpasswd'); or this: mysql > set password for 'root'@'%' = password (' newpasswd')
3. Use update to edit user table
Mysql > update user set password=password ('newpassword') where user='root' and host='localhost';mysql > flush privileges; Note: don't forget to execute the flush privileges command!
2. How to deal with mysql forgetting password
Description: when mysql is running
1. Add skip-grant-tables under [mysqld] of / etc/my.cnf to restart the mysql process. After restarting successfully, execute # mysql directly to enter mysql, and then modify: mysql > use mysqlDatabase changedmysql > update user set password=password ('newpassword') where user='root' and host='localhost';Query OK, 1 row affected (.01 sec) Rows matched: 1 Changed: 1 Warnings: 0mysql > flush privileges Query OK, 0 rows affected (0.05sec) Note: you can only use the modification method of update, but the method of set cannot be modified successfully in skip-grant-tables mode! 2. Delete skip-grant-tables from my.cnf, restart the mysql process, and enter mysql with a new password.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.