如何在centos6.8中安装mysql5.5

前端之家收集整理的这篇文章主要介绍了如何在centos6.8中安装mysql5.5前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
/etc/init.d/MysqL

本来想安装MysqL5.6或者5.7的,无奈,总是安装出错,所以改为安装5.5

安装步骤

1.确保把yum的MysqL删除干净

Code:
yum clean all
yum clean Metadata
yum clean dbcache
yum update

2.安装MysqL 5.5

wget http://dev.MysqL.com/get/Downloads/MysqL-5.5/MysqL-server-5.5.48-1.el6.x86_64.rpm
wget http://dev.MysqL.com/get/Downloads/MysqL-5.5/MysqL-client-5.5.48-1.el6.x86_64.rpm
wget http://dev.MysqL.com/get/Downloads/MysqL-5.5/MysqL-devel-5.5.48-1.el6.x86_64.rpm
rpm -ivh MysqL-server-5.5.48-1.el6.x86_64.rpm
rpm -ivh MysqL-client-5.5.48-1.el6.x86_64.rpm
rpm -ivh MysqL-devel-5.5.48-1.el6.x86_64.rpm
3.设置root可以远程登录

1.启动MysqL

/etc/init.d/msyql start
2.设置MysqL的root密码

/usr/bin/MysqLadmin -u root password '123456'

3.设置远程登录


a本地登录MysqL

MysqL -u root –p

b update user set host ='%' where user= 'root';

c:flush privileges

原文链接:https://www.f2er.com/centos/375694.html

猜你在找的CentOS相关文章