Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of changing mysql user name and password

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the method of modifying mysql user name and password, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

How to modify the user name and password of mysql: first log in to mysql; and then execute the [UPDATE user SET password] command to change the password; then execute the [update user set user] command to modify the user name; finally, refresh the permissions.

The specific methods are as follows:

Change the password:

Mysql-u root-pEnter password:***mysql > use mysql; Select Database Database changed mysql > UPDATE user SET password=PASSWORD ("New password") WHERE user=' your user name'; mysql > FLUSH PRIVILEGES;mysql > quit

Modify the user name:

Mysql-u root-pEnter password:***mysql > use mysql; Select database Database changedmysql > update user set user= "new user name" where user= "root"; change the user name root to the new user name mysql > flush privileges Refresh permissions mysql > exit Thank you for reading this article carefully. I hope the editor will share the methods and contents of changing mysql username and password to help everyone. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report