redhat AS4 下MYSQL 5.0的安裝

shwenwen發表於2010-02-24
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

Support MySQL by buying support/licenses at


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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章