The first test-packed, not very skilled. A lot of things are not right, but also back to improve
First, unload the package
Check if MySQL Server is installed:
Rpm-qa | grep MySQL
Rpm-qa | grep mariadb
Delete method:
RPM-E MySQL #普通删除模式
Rpm-e--nodeps MySQL #强行删除模式, if you use the above command to delete, prompted to have other dependent files, then use this command can be forcibly deleted.
Yum Remove mariadb-libs-5.5.41-2.el7_0.x86_64Note that mariadb also cannot exist, some words to delete the tune, delete when there are dependencies, direct yum uninstall before installing MySQL need to install Perl, and need to data:dumped this Perl module, So when installing Perl, you need to install the corresponding module using the following command, yum-y install Perl-module-install.noarch. Also need to install Libaio this module, the corresponding command for yum-y install Libaio libaio-devel Two: Then install the dependent environment:
yum-y Install gcc gcc-c++ make cmake automake autoconf libxml2 libxml2-devel zlib zlib-devel ncurses Ncurses-dev El
To create users and groups:
Groupadd MySQL
Useradd mysql-g MySQL
Setting the environment settings for Percona
Mkdir/usr/local/mysql
Mkdir/data/mysql
Cd/data/mysql
mkdir Run data tmp logs
Chown-r Mysql:mysql/usr/local/mysql
Chown-r Mysql:mysql/data/mysql
Three: Install Percona installation: TAR-XVF Percona-server-5.7.10-3-r63dafaf-el7-x86_64-bundle.tar Remove the Unused installation package: RM percona-server-57-debuginfo-5.7.10-3.1.el7.x86_64.rpm RM percona-server-57-debuginfo-5.7.10-3.1.el7.x86_64.rpm After removing LS look at the file and then start the installation MYSQL:RPM-IVH percona-server-*.rpm after the installation is complete, check the installation and install the complete configuration file directly: Initialization
/usr/bin/mysql_install_db--defaults-file=/etc/my.cnf--basedir=/usr/local/mysql--datadir=/var/lib/mysql--user= Mysql
and lift it up PerconaService MySQL StartService MySQL StatusAfter installing MySQL complete directly:Cat/var/log/mysqld.logFind the initial value password for Percona. After logging in with the initial password, execute the following statement to change the password:SET PASSWORD = PASSWORD (' ****************** ');Then authorizeGrant all privileges on * * to [e-mail protected] "172.16.25.126" identified by "*********";Grant All on * * to [e-mail protected] '% ' identified by ' Your_password ';Flush PrivilegesNote The default firewall configuration for CentOS 7 does not open 3306 ports. You can use Systemctl stop firewalld.service to turn off the firewall before you test. or use Firewall-cmd--permanent--zone=public--add-port=3306/tcp to open 3306 ports for other people to access.
Percona MySQL 5.7 again Centeros 7 on the installation