Mysql5.7 retrieves password
First contact with the database, after installing mysql5.7 in binary, it is found that the initial password can not be found in the log like yum. ~ so
First, shut down the startup database:
Add a new sentence to my.cnf: skip-grant-tables save exit restart mysql
Users can skip the password by logging in to mysql directly.
Change the password:
In the past, we modified it to use:
Update user set password=password ('mysqlpwd') where user='root'
However, the password field does not exist in version 5.7, so:
Update user set authentication_string=password ('mysqlpwd') where user='root'
Flush privileges
Finally, you can quit.