Not the answer you need?
Register and ask your own question!

MySQL showing incorrect version?

akalajakalaj EntrantInactive User Role Beginner
I recently did a fresh install of MySQL 5.6.23 and overwrote my previous 5.6.17 basedir, datadir, and init files with content from the Percona 5.6.23 directory. However, now that everything has been installed, the logs and mysql client are still somehow identifying itself as MySQL 5.6.17.

| VERSION()       |
| 5.6.17-66.0-log |
1 row in set (0.00 sec)

Linux CLI
root@localhost-akalaj:/home/akalaj# mysql --version
mysql  Ver 14.14 Distrib 5.6.23-72.1, for Linux (x86_64) using  EditLine wrapper

Base Dir Config
root@localhost-akalaj:/home/akalaj# /bin/ls -lah /usr/local | egrep "mysql|Percona"
lrwxrwxrwx  1 root staff   54 Aug 11 08:57 mysql -> /usr/local/Percona-Server-5.6.23-rel72.1-Linux.x86_64/
drwxr-xr-x 13 root root  4.0K Aug 11 08:15 Percona-Server-5.6.23-rel72.1-Linux.x86_64

This version conflict becomes a problem when using MySQL utilities as it causes me to run "--skip-version" on many things.

Where is MySQL checking the version from? How can I ensure that MySQL properly identifies the version it's on??


  • vadimtkvadimtk Contributor Percona Staff Role
    I have to ask, did you restart the server binaries after you replaced files? From what I see - it looks like you are running old binaries still.
  • akalajakalaj Entrant Inactive User Role Beginner
    vadimtk, I suspected this as well. I had taken the following steps to ensure that old binaries were not being used prior to my post.

    I ran the following for loop to ensure that all the binaries I initially copied to "/usr/local" were removed.
    for i in $(ls -1 /usr/local/PerconaServer5.6.17-66.0-rel72.1-Linux.x86_64/bin/*); do rm /usr/bin/$i; done;

    This was a manual installation, so the 5.6.17 binaries copied to /usr/bin were the only binaries copied out of the 5.6.17.

    The current basedir=/usr/local/Percona-Server-5.6.23-rel72.1-Linux.x86_64/. The only binaries that have been copied out of there are as follows:
    cp /usr/local/Percona-Server-5.6.23-rel72.1-Linux.x86_64/bin/* /usr/bin

    For good measure, I also rebooted the server. Issue still persists.

    Any other things I could check?
  • knut_forkalsrudknut_forkalsrud Entrant Current User Role Beginner
    Maybe it is as simple as some PATH problem. Try "which mysql". On my machine I get:
    [knut@r730-2.atl ~]$ which mysql
    [knut@r730-2.atl ~]$ mysql --version
    mysql  Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
    [knut@r730-2.atl ~]$ PATH=/usr/local/Percona-Server-5.7.11-4-Linux.x86_64.ssl101/bin mysql --version
    mysql  Ver 14.14 Distrib 5.7.11-4, for Linux (x86_64) using  6.0
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.