Linux系统安装MySql

  • 更新一下8.0源
yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm -y
  • 安装8.0包
yum install mysql-community-server -y

  • 5.7 稳定版本
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm -y
  • 安装5.7
yum install mysql-community-server -y
  • 启动并查看状态
systemctl enable mysqld
systemctl start mysqld
systemctl status mysqld
  • 当第一次启动MySQL服务器时,为MySQL根用户生成一个临时密码。 您可以通过运行以下命令找到密码:
grep 'temporary password' /var/log/mysqld.log
  • 密码:&eo8vI=&3I0N 修改后:xxxXXX!!!
mysql_secure_installation

mysql -uroot -p

转载于:https://www.cnblogs.com/ywq-chen/p/11348295.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值