mysql_5.7_yum_install.sh

Posted zhj5551

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql_5.7_yum_install.sh相关的知识,希望对你有一定的参考价值。

 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 [email protected]‘%‘ identified by ‘ZHj1203110904\!‘; flush privileges;"
16 mysql -uroot -pZHj1203110904! -e "show databases;"

 

以上是关于mysql_5.7_yum_install.sh的主要内容,如果未能解决你的问题,请参考以下文章

mysql_5.7_yum_install.sh

CentOS7 x86_64 环境 MySQL 5.7 安装教程

Ubuntu 20.04安装mysql 5.7

mysql 5.7:show_compatibility_56

MySQL_8.0与5.7区别之账户与安全

CentOS7 x86_64 环境 MySQL 5.7 安装教程