centos6.9安装mysql_Centos6.9安装MYSQL5.6

1. 查找mysql

[root@codewen ~]# rpm -q mysql

package mysql is not installed

[root@codewen ~]# whereis mysql

mysql: /usr/lib/mysql /usr/share/mysql

[root@codewen ~]#

2. 卸载mysql

yum remove mysql-libs

3. 清空DB缓存

yum clean dbcache

4. 下载MySQL rpm安装包

wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

5. 安装下载的rpm包

rpm -ivh mysql-community-release-el6-5.noarch.rpm

6. yum安装mysql

yum install mysql-community-server

如果这一步出现问题,请设置DNS 8.8.8.8,114.114.114.114

7. 启动服务

service mysqld start

8. 进入mysql,默认密码是空

mysql -uroot

9. 修改root密码

#在MYSQL里修改

#使用mysql

use mysql;

#更改密码

update user set password=PASSWORD("root") where user='root'

#退出

quit

10. 重新mysql服务

service mysqld restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值