The default password of mysql is empty. You can reset the password. The setting method: 1. Log in to the database with the root username and password; 2. Pass "UPDATE user SET password=PASSWORD("password") WHERE. ..” statement to change the password.
The operating environment of this article: Windows7 system, mysql5.5, Dell G3.
What is the password for mysql?
There is no sa user in mysql, there is a root user, and the sa user is only available in sqlserver. The root password is blank by default, but the password can be reset after installation. The setting method is as follows:
1. If the username and password are not set during the installation process, you can use the root username and password to log in to the database.
#2. User name: root and password is empty.
#3. If the login is successful, the following information will be displayed.
4. After entering, you can execute select * from mysql.user; to query the user information of mysql, you can see that the password is encrypted.
5. Enter "mysqld_safe --skip-grant-tablesmysql -u root mysql" in the console and click Retract.
6. After that, enter "UPDATE user SET password=PASSWORD("password") WHERE user='root';" (password is the new password and can be changed to any password you want).
Recommended study: "PHP Video Tutorial"
The above is the detailed content of What is the password for mysql?. For more information, please follow other related articles on the PHP Chinese website!