As part of a MySQL 5.5 to MySQL 5.6 upgrade across several Ubuntu servers of varying distros an audit highlighted a trivial but interesting versioning identification error in Ubuntu’s packaging of MySQL.
Ubuntu 12.04 LTS
$ sudo dpkg -l | grep mysql-server-5.5 ii mysql-server-5.5 5.5.41-0ubuntu0.12.04.1 ...
$ mysql -uroot -p -e "SELECT VERSION()" +-------------------------+ | VERSION() | +-------------------------+ | 5.5.41-0ubuntu0.12.04.1 | +-------------------------+
But when you look at the mysql --version
it does NOT say 5.5.41.
$ mysql --version mysql Ver 14.14 Distrib 5.5.34, for debian-linux-gnu (x86_64) using readline 6.2
Ubuntu 14.04 LTS
On 14.04 I get expected results.
$ sudo dpkg -l | grep mysql-server-5.5 ii mysql-server-5.5 5.5.41-0ubuntu0.14.04.1 ...
rbradfor@rubble:~$ mysql -uroot -p -e "SELECT VERSION()" +-------------------------+ | VERSION() | +-------------------------+ | 5.5.41-0ubuntu0.14.04.1 | +-------------------------+
$ mysql --version mysql Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.3