码迷,mamicode.com
首页 > 数据库 > 详细

mysql_5.7_yum_install.sh

时间:2019-07-17 00:27:42      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:tps   lin   tar   admin   mct   base   serve   cat   ase   

 1 #!/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   

原文地址:https://www.cnblogs.com/zhj5551/p/11198345.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!