centos 7 下安装mysql5.7

Posted 禅_无知

tags:

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

centos下默认安装mariadb数据库

1:将mariadb移除

yum search mysql;

yum remove mariadb-libs.x86_64;

2:下载mysql源

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm;

3:安装源

yum localinstall mysql57-community-release-el7-11.noarch.rpm;

yum search mysql

4 安装mysql社区版

yum install mysql-community-server;

5:启动mysql

service mysqld start

6:查看mysql默认密码

cat /var/log/mysqld.log | grep password

7:设置mysql密码

SET PASSWORD = PASSWORD(‘‘);

8: 刷新权限

flush privileges;

9:设置mysql可远程连接

update `user` set Host = ‘%‘ where User = ‘root‘ and Host = ‘localhost‘;

设置后刷新权限

flush privileges;

10:查看mysql 是否启动

ps -ef |grep mysqld

 

以上是关于centos 7 下安装mysql5.7的主要内容,如果未能解决你的问题,请参考以下文章

CentOS7安装MySQL5.7

centos6.7下 编译安装MySQL5.7

centos 7 下安装mysql5.7

在空白主机上一键安装kickstart服务,分发centos5.8和mysql5.7.16

速看!centos7下源码安装mysql5.7

centos下安装python,mysql5.7以及虚拟环境