2

I'm running CentOS 5.2 and upgraded MySQL to 5.5. When I run mysql I get this:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.5.45 MySQL Community Server (GPL)

But when I run mysql --version I get this:

mysql  Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using readline 5.1

Since the mysqld is mysql55-mysqld I'm sure I'm running 5.5, but why am I getting the wrong version with the version command?

  • 5
    Did you update the client too, or just the server? mysql is the client binary. – Philᵀᴹ Oct 28 '15 at 9:28
  • I ran yum install mysql55-server mysql55. – Tensigh Oct 29 '15 at 7:30
2

This problem may happen if you have multi MySQL instances on the same machine. There was pre-installed MySQL when the OS was installed, or using auto installation methods like yum: in this case when you type mysql it will point to the pre-installed one since the environment variable point there. you can test it by going to /mysql/install/path/bin use ./mysql --version this should show you the exact version of MySQL.

|improve this answer|||||
  • I did a yum erase mysql first then ran yum install mysql55. Is there anything else I can do to remove all vestiges of mysql and run only mysql55? – Tensigh Oct 29 '15 at 7:29
  • to remove MySQL completely form CentOS you need to run the following commands: 1) yum remove mysql mysql-server 2) mv /var/lib/mysql /var/lib/mysql_old_backup – Ahmad Abuhasna Oct 29 '15 at 8:18
-3

1) Reboot Mysql Server (/etc/init.d/mysql restart) If that fails, shut down machine and reboot

|improve this answer|||||
  • No need for any reboot, the server shows the right version. – jkavalik Oct 28 '15 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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