Download the source installation file
wget http://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpm
wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
Install RPM packages locally (configure MySQL installation source)
Yum-y Localinstall mysql57-community-release-el7-11.noarch.rpm
View all MySQL installation sources (default MySQL installation version 5.7)
Yum Repolist All | grep MySQL
Close the MySQL 5.6 installation source
sudo yum-config-manager--disable mysql56-community
To open the MySQL 5.7 installation source
sudo yum-config-manager--enable mysql57-community
There is no Yum-config-manager command to install the Yum Install Yum-utils.noarch tool or edit/etc/yum.repos.d/ Mysql-community.repo file Enable entry of 1 means on, 0 for shutdown
VI command to modify Python version 2.7
Vi/usr/libexec/urlgrabber-ext-down
Yum-y Install Yum-utils
Vi/bin/yum-config-manager
Install MySQL
Yum-y Install Mysql-devel Mysql-community-server
Start MySQL
Systemctl Start Mysqld.service
Secure configuration MySQL
Mysql_secure_installation
Set Password
Use MySQL;
Update user set Password=password (' Password ') where user= ' root ';
Flush privileges;
Configuration
MySQL config file is/etc/my.cnf
Finally add the encoding configuration
[Mysql]default-character-set =utf8
The character encoding here must be consistent with the/usr/share/mysql/charsets/index.xml.
2. Remote connection Settings
Assign all permissions for all tables in all databases to the root user at all IP addresses.
Mysql> Grant all privileges on * * to [e-mail protected] '% ' identified by ' password ';
If you are a new user and not root, create a new user first
Mysql>create user ' username ' @ '% ' identified by ' password ';
Restart MySQL
1, can put mysqld to/ETC/INIT.D
Restart with/etc/init.d/mysqld restart command
(CP Mysql-5.5.31/support-files/mysql.server/etc/init.d/mysqld)
2, or with Systemctl
Systemctl Restart MySQL
Or
Systemctl Restart MARIADB
3. Service MySQL Restart
Service MARIADB Restart
The remote connection is now available.
CentOS Installation mysql57