centOS7安装 mysql-community-release-el7-5.noarch.rpm 包

一、rpm包

1、wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm(下载rpm)

2、rpm -ivh mysql-community-release-el7-5.noarch.rpm(安装rpm包)

3、yum install mysql-server  (安装)

 

二、操作MySQL

1、service mysql start(启动数据库)

2、service mysql status(查看数据库状态)

3、mysql -u root -p(登录数据库)

3、GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

      flush privileges;     (赋值权限)

4、exit

 

三、Linux防火墙

1、systemctl status firewalld.service(查看防火墙状态)

2、systemctl stop firewalld.service (关闭防火墙)

 

注意点:

centos7中防火墙的文件名有改变:

1、firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

 

 

      

posted @ 2018-12-12 11:09  jiahuifeng  阅读(16663)  评论(0编辑  收藏  举报