centos6.8 yum安装mysql 5.6

转载:http://blog.csdn.net/xiegh2014/article/details/72860951


一、检查系统是否安装其他版本的MysqL数据
yumlistinstalled|grepMysqL
yum-yremoveMysqL-libs.x86_64

二、安装及配置
wgethttp://repo.MysqL.com/MysqL-community-release-el6-5.noarch.rpm
rpm-ivhMysqL-community-release-el6-5.noarch.rpm
yumrepolistall|grepMysqL
1、安装MysqL数据库
yuminstallMysqL-community-server-y

2、设置为开机启动
chkconfig--list|grepMysqLd
chkconfigMysqLdon

3、设置密码
/usr/bin/MysqLadmin-urootpassword'123456'

4、修改root密码
MysqL-uroot-p123456

MysqL>selectHost,User,PasswordfromuserwhereUser='root';
+-----------------------+------+-------------------------------------------+
|Host|User|Password|
+-----------------------+------+-------------------------------------------+
|localhost|root|*4A82FDF1D80BA7470BA2E17FEEFD5A53D5D3B762|
|localhost.localdomain|root||
|127.0.0.1|root||
|::1|root||
+-----------------------+------+-------------------------------------------+
4rowsinset(0.00sec)

MysqL>updateusersetPassword=password('123456')whereUser='root';
QueryOK,4rowsaffected(0.03sec)
Rowsmatched:4Changed:4Warnings:0

MysqL>selectHost,PasswordfromuserwhereUser='root';
+-----------------------+------+-------------------------------------------+
|Host|User|Password|
+-----------------------+------+-------------------------------------------+
|localhost|root|*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9|
|localhost.localdomain|root|*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9|
|127.0.0.1|root|*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9|
|::1|root|*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9|
+-----------------------+------+-------------------------------------------+
4rowsinset(0.00sec)

MysqL>flushprivileges;
QueryOK,0rowsaffected(0.00sec)

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native