Home >Database >Mysql Tutorial >How to find out what the mysql account password is?
Find the method: first run a cmd window as an administrator, enter "mysql -uroot -p", press Enter to enter the database; then use the "select host, user, password from mysql.user;" command You can view the account number and password.
(Recommended tutorial: mysql video tutorial)
Let me introduce to you how to go after installing mysql View mysql username and password.
Method:
under windows
1. Run cmd as system administrator.
2. View Is mysql started? If so, stop: net stop mysql.
3. Switch to the MySQL installation path: D:\WAMP\MySQL-5.6.36\bin; if the environment variable has been configured , there is no need to switch.
4. Enter at the command line: mysqld -nt --skip-grant-tables
5. Restart and run a cmd as administrator, enter: mysql - uroot -p, Enter to enter the database.
6. Find the mysql account password and execute this statement on the command line
select host,user,password from mysql.user;//即可查看到用户和密码
For more programming-related knowledge, please visit: Introduction to Programming! !
The above is the detailed content of How to find out what the mysql account password is?. For more information, please follow other related articles on the PHP Chinese website!