标签:
下载安装包
由于官网访问及版本选择下载不太方便,使用 suho 的源进行下载
http://mirrors.sohu.com/mysql/MySQL-5.6/
下载如下三个安装包:
MySQL-server-5.6.24-1.el6.x86_64.rpm
MySQL-client-5.6.24-1.el6.x86_64.rpm
MySQL-devel-5.6.24-1.el6.x86_64.rpm
进行安装
如原装有mysql 请在安装前先进行卸载
[root@test1 files]# rpm -qa | grep mysql
[root@test1 files]# yum remove -y mysql-libs-5.1.66-2.el6_3.x86_64
[root@test1 files]# rm MySQL-server-5.6.24-1.el6.x86_64.rpm ... [root@test1 files]# rpm -ivh MySQL-client-5.6.24-1.el6.x86_64.rpm Preparing... ########################################### [100%] 1:MySQL-client ########################################### [100%] [root@test1 files]# rpm -ivh MySQL-devel-5.6.24-1.el6.x86_64.rpm Preparing... ########################################### [100%] 1:MySQL-devel ########################################### [100%]
启动 mysql start 启动 stop 停止 restart 重启
[root@test1 files]# service mysql start
Starting MySQL. SUCCESS!
查看是否开机启动,设置为开机启动
[root@test1 files]# chkconfig --list | grep mysql
[root@test1 files]# chkconfig mysql on
开通远程权限 root 为用户 123456 为密码,防火墙需要开通3306 端口
进入mysql >GRANT USAGE ON *.* TO ‘nbdx‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION; >FLUSH privileges;
进入出错处理:
mysqld_safe --skip-grant-tables &
mysql -uroot -p
>use mysql;
>update mysql.user set password=PASSWORD(‘123456‘) where User=‘root‘ ;
>flush privileges ;
出错:
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
>SET PASSWORD = PASSWORD(‘123456‘);
CentOS 6.4 64位 安装 mysql 5.6.24
标签:
原文地址:http://www.cnblogs.com/cnblank/p/4410352.html