#列出安装的mysql : rpm -qa | grep mysql
#centos6.5 basic server 版本 默认安装了mysql5.1,所以先卸载mysql5 : yum -y remove mysql-libs-5.1*
1.安装service : rpm -ivh MySQL-server-5.5.48-1.linux2.6.x86_64.rpm
2:安装client : rpm -ivh MySQL-client-5.5.48-1.linux2.6.x86_64.rpm
3.启动服务and修改密码 :
service mysql start
/usr/bin/mysql_secure_installation
Remove anonymous users? 删除匿名用户?
Disallow root login remotely? 禁止root远程登录?
Remove test database and access to it? 删除测试数据库并访问它?
Reload privilege tables now? 现在重新加载权限表?
4.登录 : startmysql -uroot -p123456
安装mysql方法,记得修改密码