centos7 安装mysql

1.安装

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

2.安装启动

service mysqld restart

3.登陆

mysql -u root 

4.修改密码

set password for 'root'@'localhost' =password('123456');

5.设置远程访问

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456!' WITH GRANT OPTION;

 

posted @ 2019-03-19 11:20  启程华夏  阅读(122)  评论(0编辑  收藏  举报