1. Change the password
#/etc/init.d/mysqld Stop
# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
# mysql-u Root MySQL
mysql> UPDATE user SET Password=password (' NewPassword ') where user= ' root ';
mysql> FLUSH privileges;
Mysql> quit
#/etc/init.d/mysqld Restart
# mysql-uroot-p
Enter Password: < Enter the newly set password newpassword>
However, please note: in MySQL version 5.7, the password field name is Authentication_string
2 problem: MySQL boot error--found system error 2, the system cannot find the specified file.
The decompression version does not specify the directory as installed, so you need to change the registry:
Hkey_local_machine-system-currentcontrolset-services-mysql (service name)-imagepath
Change to: "C:\Program files\mysql\bin\mysqld"--defaults-file= "C:\Program Files\mysql\my.ini" MySQL
3.mysql Error 1045 (28000): Wrong solution
When you encounter error 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:no)
ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:yes)
Windows, the above two errors are resolved by
Locate the profile My.ini, and then open it, and you can choose to open it with Notepad
After opening, search for mysqld keyword
When found, add skip-grant-tables below mysqld to save the exit.
PS: If prompted not to save, you can cut the file to the desktop, change the save and then copy to the MySQL directory
Restart MySQL after saving
That is, the My.ini content is:
Good explanation please see: http://jingyan.baidu.com/article/3ea51489e6cfbe52e61bba25.html
Mysql-5.7.10-winx64 problems encountered during installation