CentOS7 Yum安装MySQL

CentOS 7的yum源中没有正常安装mysql时的mysql-sever文件,需要去官网上下载

MySQL6.5:
# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

MySQL7.5:
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server

成功安装之后重启mysql服务
service mysqld restart

初次安装mysql是root账户是没有密码的,设置密码的方法

# mysql -uroot
mysql> set password for 'root'@'localhost' = password('$$556677**');
mysql> exit


» 本文章为Java地带原创,欢迎转载!转载请注明本文地址,谢谢!
» 本文链接:https://blog.java-zone.org/archives/1090.html
» 订阅本站:https://blog.java-zone.org/feed/
» 转载请注明来源:Java地带  » 《CentOS7 Yum安装MySQL》

标签: MySQL, CentOS7

添加新评论