mysql_5.7_yum_install.sh
时间:2021-07-01 10:21:17
帮助过:16人阅读
#!/bin/
bash
2 #by zhangjia
3 #
2019.4.
28
4 #########################
5
6 yum -y localinstall https:
//dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
7 yum install -y mysql-community-
server
8 systemctl start mysqld.service
9 systemctl enable mysqld.service
10
11 cat /
var/log/mysqld.log|grep
‘A temporary password‘
12 #password=
"ZHj_1203110904"
13 password_old=`grep
‘password‘ /
var/log/mysqld.log|grep
‘temporary‘|awk
‘{print $NF}‘`
14 mysqladmin -uroot -p${password_old} password ZHj1203110904!
15 mysql -uroot -pZHj1203110904! -e
"grant all on *.* to root@‘%‘ identified by ‘ZHj1203110904\!‘; flush privileges;"
16 mysql -uroot -pZHj1203110904! -e
"show databases;"
mysql_5.7_yum_install.sh
标签:tps lin tar admin mct base serve cat ase