首页 > 数据库技术 > 详细

CentOS7 安装 MySQL 5.7.10

时间:2016-01-05 23:52:47      阅读:500      评论:0      收藏:0      [点我收藏+]

卸载冲突的rpm包:
rpm -qa|grep mariadb
rpm -e --nodeps mariadb-libs-5.5.41-2.el7_0.x86_64

安装:
rmp -ivh mysql-community-common-5.7.10-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.10-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.10-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.10-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.10-1.el7.x86_64.rpm

初始化:
mysqld --initialize --user=mysql

启动:
systemctl start mysqld
systemctl status mysqld

连接:
vim /usr/log/mysqld.log(找到随机生成的密码)
mysql -u root -p

修改密码:
ALTER USER ‘root‘@‘localhost‘ identified by ‘mYsqL$%123‘;

注意密码必须包含数字、大写字母、小写字母、特殊字符,如果你设置的密码过于简单,会得到一个错误提示。

参考:
http://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html
http://jingyan.baidu.com/article/93f9803f010d8fe0e56f555e.html

CentOS7 安装 MySQL 5.7.10

原文:http://www.cnblogs.com/codingthings/p/5103943.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!