In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following is about how to set the password for the Mysql database. The secret of the text is that it is close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on how to set the password for the Mysql database.
Mysqladmin-u username-p password 'new password' # Linux command line
Set password=password ('new password'); # change the password for the current login user under the database command line
Set password for user name @ host address = password ('new password'); # change the password for a user under the database command line
Update mysql.user set password=password ('new password') where user=' user name 'and host=' host address'; # change the password for a user under the database command line
Under the database command line, you need to use the flush privieleges; command to refresh the cache after changing the password
Mysql forgot the login user password. Reset method:
Method 1:
1. Systemctl stop mariadb.service # stop database service
two。 Edit the / etc/my.cnf file and add the following:
Skip-grant-tables
3. After systemctl restart mariadb.service # restarts the database service, use the mysql command to log in to the database without a password (safe mode at this time)
4. Use the update command to change the password in safe mode in the database.
5. Stop the database service
6. Comment or delete the line skip-grant-tables in the / etc/my.cnf file
7. Restart the database service
Method 2:
1. Systemctl stop mariadb.service # stop database service
two。 Execute the mysqld_safe-- skip-grant-tables command to enter database security mode
3. Use the mysql command on other terminals to log in to the database without a password.
4. Use the update command to change the password.
Is there anything you don't understand about how to set the password of the Mysql database above? Or if you want to know more about it, you can continue to follow our industry information section.
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.