Original help:
http://www.hishenyi.com/archives/808
Previous students have been installed, did not become. In particular, the initial root password is not known when installed. So here it is, in fact, the process is simple. There is no need to bypass any password judgments and then modify the database fields. Everything is very simple, there are a lot of misleading text on the internet is really embarrassing.
The first common MySQL is divided into community and Enterprise editions. Community Edition no charge, Enterprise Edition in need of technical support is charged, this is normal. No charge who has time to talk to you.
Then we often use the Community version, the general Community Edition features more than the Enterprise Edition, because the community version often contains some of the features just come out for us to use, stable will join the Enterprise version. So the Community edition is also a small white mouse version.
Then who told us not to spend money.
The official mysql.com supports us in using Yum to install the latest version of MySQL 5.7. So you don't need to manually compile the installation (unless you need to)
If you are the centos6.x series, then use http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm this RPM package
If you are a CentOS 7.x series, then you need to use http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
The official is very intimate, has given how to install the command
1, RPM-UVH xxxx.rpm (here to replace your above address)
2, yum install Mysql-community-server (slowly install it, download takes time)
3, installed, you can use service mysqld start to launch services
4, then we will use Mysql-u root-p to log in to MySQL
So where is the root default password?
At this time many students want to think with Skip-grant-tables. And then you find a lot of problems.
5, in fact, after the first boot, mysql5.7 will generate a random root password, and put in the/var/log/mysqld.log this log (if you change the path, it is your path Oh _
Please use grep ' temporary password '/var/log/mysqld.log This command to read it out. This is your root initial password.
6, use Mysql-u root-p and then enter the above password into
ALTER User User () identified by ' 123123; The delegate changes the password of the currently logged-on user to 123123
7, if you want to directly manually change the data table field, is not not available.
First Use MySQL
Update Mysql.user set Authentication_string=password (' 123123′) where user= ' root ';
Note that the password field for the user table in 5.7 is not password but authentication_string.
8, it is not recommended to go in to change the system table. MySQL is still very intimate and delicate, put all kinds of situations to help you write well. The premise is that you have to read English.
Linux Learning notes Yum installation mysql5.7