yum install mariadb-server mariadb
######################################################
systemctl start mariadb
systemctl stop mariadb
systemctl restart mariadb
systemctl enable mariadb
######################################################
set PASSWORD = PASSWORD(‘123456’);
set password for ‘root’@‘localhost’ =password(‘password’);
flush privileges;
vi /etc/my.cnf
[mysqld]
character-set-server=utf8
/home/admin/mysql-5.7.32/bin/mysql_install_db --user=mysql --basedir=/home/admin/mysql-5.7.32/ --datadir=/home/admin/mysql-5.7.32/data/
cp /home/admin/mysql-5.7.32/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
service mysqld start
yum install libaio.x86_64 libaio-devel.x86_64
#####################################################
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
mv CentOS7-Base-163.repo CentOS-Base.repo
yum clean all
yum makecache
yum update
yum install mariadb-server mariadb
yum update
######################################################
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.32-el7-x86_64.tar.gz --no-check-certificate
mysql -uroot -pshunde
mysqldump -u root -pshunde -d ep_dated_db > ep_dated_db.sql
mysqldump -u root -pshunde -d ep_updated > ep_updated.sql
create database ep_dated_db;
create database ep_updated;
######################################################
mysql -uroot -pshunde ep_dated_db < ep_dated_db.sql
mysql -uroot -pshunde ep_updated < ep_updated.sql
######################################################