标签:
centos 6 安装MySQL 5.7
1. 系统本身带的有MySQL5.1 ,给卸载了 yum remove mysql*
2. 检查卸载 rpm -qa | grep mysql
3. 准备yum 安装首先下载mysql yum 仓文件
http://dev.mysql.com/downloads/file/?id=462552
选择 No thanks, just start my download
4. 导入 yum 仓储
yum localinstall mysql57-community-release-el6-8.noarch.rpm
5. yum install mysql
6. 登录MySQL提示 ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)
7. 关闭数据库 service mysqld stop
8. 启动数据库 mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
9. mysql 进入数据库
update user set authentication_string=password(‘root‘) where user=‘root‘ ;
10. 重启数据库 service mysqld restart
11. mysql -hlocalhost -uroot -p
标签:
原文地址:http://www.cnblogs.com/localit/p/5483981.html