1,首先下载MySQL安装包,版本为
MySQL Community Server 5.6.17 目前是最高版本
下载地址为:http://dev.mysql.com/downloads/mysql/ 下载的rpm包
直接输入: rpm -ivh MySQL-server-5.6.17-1.el6.x86_64.rpm 报出了如下错误,网上一查是因为包冲突,然后就把原来的包给卸载干净,输入 yum -y remove mysql* 搞定
Preparing... ########################################### [100%]
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
安装完成
输入 service mysql start 即可启动服务
2,安装客户端 否则MySQL命令是用不了的,下载安装客户端
然后就可以 mysql -u root -P 了 之后当然是要授权远程连接权限了,值得注意的是(
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.) 意思是给root用户生成了随机密码,这个密码可以在'/root/.mysql_secret'.里找的到
登录,然后输入grant all privileges on *.* to 'root'@'%'identified by 'root' with grant option; 即可