安装mysql 5.5时出错!

[复制链接]
查看11 | 回复1 | 2013-1-18 08:52:19 | 显示全部楼层 |阅读模式
版本格式是rpm包,linux redhat 5的操作系统,mysql版本为5.5,在之前装过5.0,但是已经卸载了。
出错如下:
[root@localhost opt]# rpm -ivh MySQL-server-5.5.28-1.rhel5.i386.rpm
Preparing...
########################################### [100%]
ls: /var/lib/mysql/*.err: No such file or directory
ls: /var/lib/mysql/*.err: No such file or directory
1:MySQL-server ########################################### [100%]
/var/lib/mysql/这个目录存在,且权限如下:
[root@localhost opt]# ll -d /var/lib/mysql/
drwxr-xr-x 4 mysql mysql 4096 Oct 16 22:31 /var/lib/mysql/


回复

使用道具 举报

千问 | 2013-1-18 08:52:19 | 显示全部楼层
好了。[root@localhost lib]# rpm -ivh /opt/MySQL-server-5.5.28-1.rhel5.i386.rpm
Preparing...
########################################### [100%]
1:MySQL-server ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
原因是之前安装过mysql,有的项目没有彻底清理掉,我的是删除了所有相关数据文件,但没有删除数据目录,所有导致错误。
结论: 在装过mysql的linux系统上再装mysql时,要把与之相关的痕迹都清理掉。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行