The reason for writing this article is: In the beginning to use the Linux operating system to build the lamp environment, and began to search for information on Google and Baidu, met not a lot of problems, I decided to write this article summed up in Linux under the Yum installation MySQL database process, As for compiling the installation, I can not do too much to add here, because I do not want to go to a full grasp of the knowledge I have not, you forgive me, after understanding will make up.
OK, let's go straight to the chase:
Linux under yum install MySQL
1.
wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
2.
RPM-UVH mysql57-community-release-el6-9. noarch.rpm
3. Installing the MySQL Service
Yum Install mysql-community-server-y
4. When you are done, start the service
Service mysqld Start
5. After booting, check the password automatically generated by the MySQL installation process
grep " Password " /var/log/mysqld.log
The first line "[email protected]:" The following character is the password, we need to use it to set up our own root login password
6. MySQL Security Configuration Wizard
It says here that, according to the default settings, an anonymous user is generated during the MySQL installation, which allows anyone to log in without having to use the account name, which can be done in a test environment, but is not recommended in a production environment. So, do you want to remove anonymous users?
The previous setting removed the anonymous user, and the setting was successful. Here is another problem: under normal circumstances, the root user is allowed to log in only "local", if you choose to confirm that the remote login is not possible. (I chose N.)
Then confirm that you want to delete the test database and access permissions to the test database
Refresh authorization form to make changes effective
7. Log in to MySQL using the root user
Mysql-u root-p
The directory where the MySQL configuration file is located:
More configuration can be done here.
Linux under Yum install MySQL