下载服务端:http://download.csdn.net/detail/yangxy81118/7386383

rpm -ivh MySQL-server-5.5.34-1.linux2.6.x86_64.rpm

下载客户端: http://download.csdn.net/detail/yangxy81118/7386361

rpm -ivh MySQL-client-5.5.34-1.linux2.6.x86_64.rpm


过程中是否发现:

file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.5.34-1.linux2.6.x86_64 conflicts with file from package mariadb-libs-1:5.5.40-1.el7_0.x86_64
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.5.34-1.linux2.6.x86_64 conflicts with file from package mariadb-libs-1:5.5.40-1.el7_0.x86_64
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.5.34-1.linux2.6.x86_64 conflicts with file from package mariadb-libs-1:5.5.40-1.el7_0.x86_64
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.5.34-1.linux2.6.x86_64 conflicts with file from package mariadb-libs-1:5.5.40-1.el7_0.x86_64
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.5.34-1.linux2.6.x86_64 conflicts with file from package mariadb-libs-1:5.5.40-1.el7_0.x86_64

因为包冲突了,解决方案:

看到每一行末尾部分的mariadb-libs-xxxxxx没有?

没错,我们现在就卸载它

yum -y remove mariadb-libs*

然后你就会发现安装一路顺风了~

接下来

启动MySQL:

service mysql start


执行:

mysql -u root -p

然后直接enter进入(不需要输入密码)

进去后自行修改root密码吧

UPDATE user SET password=password("123456") WHERE user='root';

如果遇到忘记root密码,或者是莫名其妙进不去MySQL的情况:

/etc/init.d/mysqld stop
# mysqld_safe --skip-grant-tables &&
# mysql
mysql> use mysql;
mysql> UPDATE user SET password=password("123456") WHERE user='root';   
mysql> flush privileges;
mysql> exit;

以上,你应该已经可以进去了!祝好运!

Logo

更多推荐