标签:
不想编译了,心累,centos默认的mysql还是5.1版本的,尝试下mysql5.7吧
wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
rpm -ivh mysql57-community-release-el6-9.noarch.rpm
yum install mysql-server
================================================================================================================================================================================================================= 软件包 架构 版本 仓库 大小 ================================================================================================================================================================================================================= 正在安装: mysql-community-client x86_64 5.7.16-1.el6 mysql57-community 23 M replacing mysql.x86_64 5.1.73-7.el6 mysql-community-devel x86_64 5.7.16-1.el6 mysql57-community 3.6 M replacing mysql-devel.x86_64 5.1.73-7.el6 mysql-community-libs x86_64 5.7.16-1.el6 mysql57-community 2.1 M replacing mysql-libs.x86_64 5.1.73-7.el6 mysql-community-libs-compat x86_64 5.7.16-1.el6 mysql57-community 1.6 M replacing mysql-libs.x86_64 5.1.73-7.el6 mysql-community-server x86_64 5.7.16-1.el6 mysql57-community 144 M 为依赖而安装: mysql-community-common x86_64 5.7.16-1.el6 mysql57-community 327 k 事务概要 ================================================================================================================================================================================================================= Install 6 Package(s) 总下载量:174 M
启动:
service mysqld start
# service mysqld start 初始化 MySQL 数据库: [确定] Installing validate password plugin: [确定] 正在启动 mysqld: [确定]
顺利启动,,
设置下密码吧,啊不,初始化下安全配置
[root@cloud src]# mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: Error: Access denied for user ‘root‘@‘localhost‘ (using password: NO) [root@cloud src]# mysql -uroot -p Enter password: ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO) [root@cloud src]#
我晕,默认密码不是空?
不知道mysql5.7的默认密码
是初始化的姿势不对吗?
wocao, 密码在日志里?
cat /var/log/mysqld.log|grep ‘temporary password‘
2016-10-16T14:57:01.551620Z 1 [Note] A temporary password is generated for root@localhost: gwKrIlyU+4O7
把密码cat出来,。。
改下密码,应该就好了吧
# mysql_secure_installation
标签:
原文地址:http://www.cnblogs.com/longzhu/p/5968103.html