MySQL version appears to be inconsistent?
-
22-02-2021 - |
Pergunta
I have recently upgraded mysqld (percona server) from 5.5.60-38.12 to 5.5.62-38.14. This is on Debian, and the upgrade was done like this:
# apt-get update
# apt-get upgrade
I am surprised to find that the version is reported differently internally from what I get on the command line:
db3 root = mysql -V
mysql Ver 14.14 Distrib 5.5.62-38.14, for debian-linux-gnu (x86_64) using readline 5.1
mysql> select version();
+------------------+
| version() |
+------------------+
| 5.5.60-38.12-log |
+------------------+
1 row in set (0.00 sec)
Is this normal? Or do I need to do something to fix this issue?
Edit: I've allso checked the installed packages:
db3 root = dpkg -l | grep percona
ii libperconaserverclient18 5.5.62-rel38.14-1.stretch amd64 Percona Server database client library
ii percona-server-client-5.5 5.5.62-rel38.14-1.stretch amd64 Percona Server database client binaries
ii percona-server-common-5.5 5.5.62-rel38.14-1.stretch amd64 Percona Server database common files
ii percona-server-server-5.5 5.5.62-rel38.14-1.stretch amd64 Percona Server database server binaries
ii percona-toolkit 3.1.0-2.stretch amd64 Advanced MySQL and system command-line tools
ii percona-xtrabackup 2.3.10-1.stretch amd64 Open source backup tool for InnoDB and XtraDB
Solução
Answering my own question, in case other might benefit.
The explanation, it turns out, was that although the upgrade succeeded, the restart of the daemon had failed silently. It took a kill -9
and systemctl start mysql
to sort that out.
Outras dicas
This is little incorrect steps to upgrade mysql version.
Although, to overcome this you can try below steps if it fixes this issue.
- Try mysql_upgrade,
mysql_upgrade -uuser -ppassword
- Restart mysql instance,
systemctl restart mysql