redhat AS4 下MYSQL 5.0的安装

本文介绍如何在RedHat AS4系统中卸载旧版MySQL并安装MySQL 5.0的过程。包括使用rpm命令查询已安装的MySQL相关RPM包,解决卸载过程中遇到的依赖问题,以及安装新版本MySQL的具体步骤。
redhat AS4 下MYSQL 5.0的删除、安装。装redhat操作系统时可能把自带的mysql包装上,但是自带的mysql版本太低,一般4.0,先删除旧mysql,然后安装较高版本mysql。[@more@]

我们要学会用rpm -qa 这个命令,查询我们安装过的相应的mysql的RPM,然后把这些包一个一个的卸掉
[root@localhost f]# rpm -qa | grep mysql
mysql-4.1.12-3.RHEL4.1
卸载过程:是从最下面的一个包开始,因为有些东西是有顺序的。方法是:
[root@svnserver]# rpm mysql-4.1.12-3.RHEL4.1
如果在卸载mysql-devel出现如下的错误:
[root@localhost f]# rpm -e mysql-4.1.12-3.RHEL4.1
error: Failed dependencies:
libmysqlclient.so.14 is needed by (installed) cyrus-sasl-sql-2.1.19-5.EL4.i386
libmysqlclient.so.14 is needed by (installed) dovecot-0.99.11-2.EL4.1.i386
那么,你需要按倒序来先删除dovecot-0.99.11-2.EL4.1.i386,然后是cyrus-sasl-sql-2.1.19-5.EL4.i386,最后,你可以完全删除mysql-devel,其他的类似。
[root@localhost f]# rpm -e dovecot-0.99.11-2.EL4.1.i386
[root@localhost f]# rpm -e cyrus-sasl-sql-2.1.19-5.EL4.i386
开始卸载

[root@localhost f]# rpm -e mysql-4.1.12-3.RHEL4.1


安装MYSQL

[root@localhost f]# rpm -i MySQL-server-community-5.0.45-0.rhel4.i386.rpm
[root@localhost f]# rpm -i MySQL-client-community-5.0.45-0.rhel4.i386.rpm
[root@localhost f]# mysqladmin -u root password '123456'

完成。

[root@localhost f]# rpm -i MySQL-server-community-5.0.51a-0.rhel4.i386.rpm
rpm -i MySQL-server-community-5.0.51a-0.rhel4.i386.rpm
warning: MySQL-server-community-5.0.51a-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
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!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com


Notes regarding SELinux on this platform:
=========================================

The default policy might cause server startup to fail because it is
not allowed to access critical files. In this case, please update
your installation.

The default policy might also cause inavailability of SSL related
features because the server is not allowed to access /dev/random
and /dev/urandom. If this is a problem, please do the following:

1) install selinux-policy-targeted-sources from your OS vendor
2) add the following two lines to /etc/selinux/targeted/src/policy/domains/program/mysqld.te:
allow mysqld_t random_device_t:chr_file read;
allow mysqld_t urandom_device_t:chr_file read;
3) cd to /etc/selinux/targeted/src/policy and issue the following command:
make load

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/143526/viewspace-1031418/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/143526/viewspace-1031418/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值