1, first download MySQL installation file, I installed here is MySQL5.1.7 version, Download link: http://pan.baidu.com/share/link? Did id = 255483056 & amp; uk = 924063144 http://pan.baidu.com/share/link? Consumer id = 269901909 & amp; uk = 9240631442. install the MySQL database server
1. first download the MySQL installation file. I have installed MySQL5.1.7 here,
Download link: http://pan.baidu.com/share/link? Consumer id = 255483056 & uk = 924063144
Http://pan.baidu.com/share/link? Consumer id = 269901909 & uk = 924063144
2. install the MySQL database server
Go to the folder where the installation package is located and run the command rpm-ivh MySQL-server-5.1.7-0.i386.rpm to install the MySQL server.
If a conflict with the original version is reported, execute the rpm-qa | grep-I mysql command to display the installed Mysql version, my display mysql-libs-5.1.61-4.el6.i686
If so, force delete: rpm-e -- nodeps mysql-libs-5.1.61-4.el6.i686 (force delete because there is a package dependency)
My error message is as follows:
MySQL-server-5.1.7-0.i386.rpm Preparing... ########################################### [100%] file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686 file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
Then run the rpm-ivh MySQL-server-5.1.7-0.i386.rpm installation to install successfully.
I have installed it successfully, but the mysql service cannot be started, and it always fails to be started. Baidu later, because of selinux, it is okay to disable selinux.
Disable selinux: vi/etc/selinux/config, change SELINUX = enforcing to SELINUX = disabled, and restart
After selinux is disabled, the mysql service cannot be started. because the installed mysql owner is root, a user mysql will be created during mysql installation, as long as/var/lib/mysql
Run chown-R mysql: mysql/var/lib/mysql.
Now, you can run service mysql start to start the mysql service.
3. install the MySQL client
Execute the command rpm-ivh MySQL-client-5.1.7-0.i386.rpm for installation.
4. installation successful
After MySQL is successfully installed, import the SQL file to the database as follows:
Go to MYSQL Command Line Client
1. create database first: create database test note: test is the name of the created database
2. switch to the current database: use test
3. enter \./root/test. SQL or souce/root/test. SQL.
Follow these steps to import the backup SQL script to the database in linux.