centos6.7 method of installing mysql5.5.48
- 2020-05-15 02:58:21
- OfStack
The example in this article describes how to install mysql5.5.48 for centos6.7. I will share it with you for your reference as follows:
RPM install mysql 5.5.48
Download the MySQL installation package rpm file, you can go to the official website of MySQL to find the corresponding version, 1 generally need to download 3 files
MySQL-server
MySQL-client
MySQL-devel
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.48-1.el6.x86_64.rpm
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.48-1.el6.x86_64.rpm
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.5.48-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.5.48-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.5.48-1.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.5.48-1.el6.x86_64.rpm
Error installing server:
[root@localhost ~]# rpm -ivh MySQL-server-5.5.48-1.el6.x86_64.rpm
warning: MySQL-server-5.5.48-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.48-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.48-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.48-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.48-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.48-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64
Error cause: package conflict
centos6.7 basic server version installs mysql5.1 by default, so uninstall mysql5.1 first
yum -y remove mysql-libs-5.1*
Then reinstall it
rpm -ivh MySQL-server-5.5.48-1.el6.x86_64.rpm
Start the mysql
[root@localhost ~]# service mysql start
Starting MySQL SUCCESS!
The my.cnf solution could not be found after installing MySQL of the official RPM package under CentOS
Copy/usr/share/mysql/my - medium. cnf file to/etc directory,
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
Local area network mysql connection slow solution
ping is fast, mysql is slow,
The reason is that mysql performs DNS reverse parsing on the connected client.
There are two solutions:
1. Write the ip of client in the mysql server /etc/hosts file and just give it a name.
2. Add the copyright © skip-name-resolve to my.cnf.
I hope this article has been helpful to you in configuring your centos server.