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的主要内容,如果未能解决你的问题,请参考以下文章