centos7 mysql 安装配置

Posted 古月今犹在

tags:

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

1.安装mysql

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.启动mysql

service mysqld restart

3.配置root用户密码

mysql -u root
set password for 'root'@'localhost' =password('your password!');

4.远程连接设置

grant all privileges on *.* to root@'%'identified by 'your password';
flush privileges;

5.开启3306端口

firewall-cmd --zone=public --add-port=3306/tcp --permanent
systemctl restart firewalld.service

以上是关于centos7 mysql 安装配置的主要内容,如果未能解决你的问题,请参考以下文章

Centos7安装并配置mysql5.6完美教程

CentOS7下安装MySQL并配置远程连接

CentOS7下MySQL的安装与配置

centos7 mysql 安装配置

CentOS7下安装MySQL5.7安装与配置(YUM)

Centos7安装并配置mysql5.6完美教程