Centos7安装Mysql

Centos7安装MySQL

我们提供的服务有:网站设计、成都网站设计、微信公众号开发、网站优化、网站认证、邵原ssl等。为成百上千企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的邵原网站制作公司

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm

ls /etc/yum.repos.d/


yum repolist all | grep mysql


yum install mysql-server


rpm -qa | grep mysql


systemctl start mysql

systemctl restart mysql

systemctl stop mysql

systemctl enable mysql

mysql -u root

mysql> use mysql;

mysql> update user set password=PASSWORD("这里输入root用户密码") where User='root';

mysql> flush privileges;

mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456";

mysql>show grants for root@'%';

firewall-cmd --add-port=3306/tcp --permanent

firewall-cmd --reload






网站名称:Centos7安装Mysql
文章转载:http://pwwzsj.com/article/geedoc.html