An earlier version of mysql server has been installed on the Linux server in use. When the rpm package is used for installation, a version conflict is prompted and the installation cannot proceed.
The solution is as follows:
1. First, find all the mysql instances installed in the system.
# Rpm-qa | grap-I after mysql runs this command, all lists are displayed.
Mysql-4.1.20-1.RHEL4.1
Mysqlclient10-3.23.58-4.RHEL4.1
2. Force Delete the list one by one:
# Rpm-ev -- nodeps mysql-4.1.20-1.RHEL4.1.
# Rpm-ev -- nodeps mysqlclient10-3.23.58-4.RHEL4.1.
3. manually delete several files of earlier versions:
# Rpm-f/etc/my. cnf
# Rpm-rf/usr/var/lib/mysql
Now you can perform a new installation of mysql, the required software package:
Package name and purpose
MySQL-server-community-5.0.51a-0.rhel4.i386.rpm MySQL Server Software
MySQL-client-community-5.0.51a-0.rhel4.i386.rpm MySQL client software
MySQL-devel-community-5.0.51a-0.rhel4.i386.rpm various library files, including software required to compile other MySQL clients
MySQL-shared-community-5.0.51a-0.rhel4.i386.rpm
MySQL-shared-compat-4.0.24-0.i386.rpm
Some library files shared by the MySQL client and shared-compat can only be selected
Perl-DBI-1.40-5.i386.rpm Perl software support
Upload the downloaded software package to the Linux server and start installation (note the installation sequence)
Set the administrator root password:
[Root @ localhost mysql] #/usr/bin/mysqladmin-u root password '123'
Copy the configuration file:
[Root @ localhost mysql] # cd/usr/share/mysql
[Root @ localhost mysql] # cp my-medium.cnf/etc/my. cnf
Start the MySQL service:
[Root @ localhost mysql] # service mysql start