/etc/init.d/mysql
本来想安装mysql5.6或者5.7的,无奈,总是安装出错,所以改为安装5.5
安装步骤
1.确保把yum的mysql源删除干净
Code:
yum clean all
Code:
yum clean metadata
Code:
yum clean dbcache
Code:
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.rpm3.设置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