1. Check the installed MARIADB
Rpm-qa |grep mariadb
Get the installed packages already installed
Mariadb-libs-5.5.56-2.el7.x86_64
Mariadb-devel-5.5.56-2.el7.x86_64
Mariadb-server-5.5.56-2.el7.x86_64
Mariadb-5.5.56-2.el7.x86_64
To perform the uninstall operation:
RPM-E--nodeps mariadb-libs-5.5.56-2.el7.x86_64
Rpm-e--nodepsmariadb-devel-5.5.56-2.el7.x86_64
Rpm-e--nodepsmariadb-server-5.5.56-2.el7.x86_64
Rpm-e--nodepsmariadb-5.5.56-2.el7.x86_64
2. Install MySQL
Download rpm generate Repo file:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
RPM-VIH mysql-community-release-el7-5.noarch.rpm
3. Yum install MySQL
Yum Install Mysql-server
4. Intermediate Precautions:
If you are prompted not to install perf, you can install
Yum Install Perl-json.noarch
If Python has been upgraded to 3.6, you need to modify the Yum configuration file:
Modify the file/usr/bin/yum,/usr/libexec/urlgrabber-ext-down the corresponding Python in the header is #!/usr/bin/python2.7
5. Start MySQL After the installation is complete
Systemctl start MySQL
6. Change the root user to add permissions and change the password to execute MySQL under the user
Grant all privileges on * * to ' root ' @ '% '
Update user set Password=password (' Test6530 ') where user= ' root '
Flush Privileges
7. Modify the character set:
Vim/etc/my.conf
Modify the main place for
[Mysqld]character-set-server=utf8 collation-server=utf8_general_ci sql_mode= ' no_engine_substitution '
[Mysql]default-character-set = Utf8[mysql.server]default-character-set = Utf8[mysqld_safe]default-character-set = Utf8[client]default-character-set = UTF8
Available status.
CentOS7 Uninstall MARIADB The process of installing MySQL: