In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you how to change the mysql password by php. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Php changes the mysql password: 1, open the wamp environment, select the myql console; 2, select the database; 3, change the password through "update user set password=password () where user = 'root';".
This article operating environment: Windows7 system, PHP7.1, Dell G3 computer.
How does php change the mysql password? The method of changing password in mysql console in php
In the construction of php environment, it is often encountered that the database link password cannot be set to empty. In addition to opening the option that the database link password is empty, you can also quickly set the default password in the Mysql console and demonstrate it quickly in the wamp environment.
Methods:
Open the wamp environment and select the myql console
Enter the console, press Enter to enter directly if there is no password (I used to have a password here)
After logging in to the Mysql console, select the database
Use mysql
Select a database named Mysql
After the database is selected successfully, start to change the password of the root user
Update user set password=password ('password you set') where user = 'root'
Enter to execute the statement. After the successful execution, refresh it with flush privileges.
That's when the new password takes effect.
The above is how php changes mysql passwords. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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: 224
*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.