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.
MySQL CLI
mysql> SELECT VERSION();
+-----------------+
| 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??
Maybe it is as simple as some PATH problem. Try “which mysql”. On my machine I get:
[knut@r730-2.atl ~]$ which mysql
/usr/bin/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