I have installed MySQL 5.1.73 community edition through RPM. It was working fine. I uninstalled this version by using yum remove mysql-server command. I wanted to upgrade MySQL from 5.1.73 to 5.6.19 community edition. Then I installed it by sudo rpm -i /u000/MySQL-server-5.6.19-1.rhel5.x86_64.rpm command. After installation, I was able to start mysql by issuing sudo /etc/init.d/mysql start. After this, I tried to install MySQL-shared-compat-5.6.19-1.rhel5.x86_64.rpm using RPM command. But, it is giving conflict message with mysql 5.1.73 - install of MySQL-server-5.6.19-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-4.el6.x86_64. It is same for MySQL-client-5.6.19-1.rhel5.x86_64.rpm. Again, I got the similar conflict message. After this, I tried to connect MySQL by issuing below command:

$ mysql -uroot -p3pkvFtaWM_PTCwJ8 
-bash: mysql: command not found
  • How can I fix this issue and run the MySQL 5.6 as normally?
  • Do I need to clean MySQL from server?
  • Uninstall everything. Then, from the root directory, do a "sudo find . -name "mysql*"" and then delete any files that this finds. It can be hell when you have files hanging around after an uninstall.
    – Vérace
    Commented Jul 9, 2014 at 18:15
  • @Vérace: its correct that after uninstalling it's a hell to remove all the files. I tried it by using locate mysql command to list all the files and delete those by issuing rm -r command. But, still some library files there...
    – ursitesion
    Commented Jul 9, 2014 at 18:40
  • :-) - just make absolutely sure that you have deleted everything before installing a new system. Or, you could go the source code route - I now find this preferable.
    – Vérace
    Commented Jul 9, 2014 at 18:45
  • should I delete files under /var/spool/up2date directory like /var/spool/up2date/mysql51-build-1-9.el5.x86_64.hdr?
    – ursitesion
    Commented Jul 9, 2014 at 18:50
  • Also, should I delete files like ./usr/lib/python2.4/site-packages/sos/plugins/mysql.pyc ./usr/lib/python2.4/site-packages/sos/plugins/mysql.pyo ./usr/lib/python2.4/site-packages/sos/plugins/mysql.py
    – ursitesion
    Commented Jul 9, 2014 at 18:52

1 Answer 1


Search for mysql-related packages that are now installed: rpm -qa | grep -i mysql

Delete any packages like mysql, mysql-server, mysql-client, mysql-shared, mysql-shared-compat, mysql-libs. yum remove mysql-server You do not need to remove mysql library bindings like python-mysqldb, php-mysql, etc., unless they had a dependency with some of the previous packages.

I recommend you to install the Oracle MySQL yum repositories, that will make the installing and maintenance much easier, unless you know what you are doing and want more control over your packages. An installation guide is detailed here: http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/index.html Basically, it involves creating a .repo file and yum update.

  • below 2 questions: (A) yum is supporting for removing but not for installing. I am getting error like 401 autorization error in accessing yu repository mirror. (B) is it necessary to install mysql-shared-library before installing mysql-server and mysql-client? If I install mysql-shared-compat-library after installation of server and client, will there be any issue?
    – ursitesion
    Commented Jul 10, 2014 at 5:53
  • (A) Make sure you install this: dev.mysql.com/get/mysql-community-release-el5-5.noarch.rpm In any case, yum localinstall should do a similar thing as rpm -i (B) if the repository is installed, both the client and the server install the shared libraries automatically. As far as I know (I may be wrong) you have to manually install server and client.
    – jynus
    Commented Jul 10, 2014 at 6:12
  • How do I check that repository is installed? I installed server and client manually.
    – ursitesion
    Commented Jul 10, 2014 at 7:17
  • yum repolist enabled | grep "mysql.*-community.*"
    – jynus
    Commented Jul 10, 2014 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.