This article refers to the MySQL website.
The native system environment is: CentOS 7.0, minimized version;
MySQL version that will be installed: V5.7 Community version
I. Summary
1, the current MySQL only Community Edition (community) is free, the other versions are commercial;
2, MySQL uses C/s architecture, server side responsible for data storage, the client is responsible for interaction, so if you want to operate MySQL in the program, need to use the MySQL Clien library, install not only need to install Mysql-server, You will also need to install mysql-client.
Second, installation
1, install the MySQL corresponding Yum repository
(1), download the corresponding Yum respository package in http://dev.mysql.com/downloads/repo/yum/, and then use the RPM installation, such as:
(2), check which packages have been activated for the installable state
The last column enabled is activated.
(3), adjust the activated MySQL version
If you want to install a different version of MySQL, you can use Yum-config-manager or modify/etc/yum.repos.d/mysql-community.repo文件来达到,但是要保证只有一个版本被enabled,其他版本被disabled。
2. Installation
The following MySQL software will be installed:
3. Check
1>client
The version shown indicates that the MySQL client has been successfully installed.
2>server
MySQL server's process name is mysqld, first look at the status of Mysqld, as follows:
The default is not started, starting the service, as follows:
Note: The V5.7 version has been set to boot after boot, if it is other version need to manually set boot.
Third, the configuration
1. Login Password
(1), initial password
After installation, MySQL server creates superuser [email protected] By default, and its password is saved in the error log file, which can be obtained in the following ways:
(2), change the root password
The red part is the new password you want to set.
mysql--Introduction