3.通过命令检查版本
[mysql@cjc-db-01 ~]$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.44-log MySQL Community Server (GPL)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.44-log |
+------------+
1 row in set (0.00 sec)
[mysql@cjc-db-01 bin]$ cp mysqld mysqld_5744bak
[mysql@cjc-db-01 bin]$ ls -lrth mysqld*
....
-rwxr-xr-x 1 mysql mysql 241M Oct 11 2023 mysqld
-rwxr-xr-x 1 mysql mysql 241M Jan 3 21:08 mysqld_5744bak
8.检查版本
检查日志,显示为mysqld 5.7.88-log。
[mysql@cjc-db-01 log]$ tail -10f error.log
...
2025-01-03T21:14:55.154580+08:00 0 [Note] mysqld (mysqld 5.7.88-log) starting as process 8662 ...
mysql客户端还是5.7.44版本
[mysql@cjc-db-01 ~]$ mysql -V
mysql Ver 14.14 Distrib 5.7.44, for el7 (x86_64) using EditLine wrapper
mysql服务端显示5.7.88版本
[mysql@cjc-db-01 ~]$ mysqld -V
mysqld Ver 5.7.88 for el7 on x86_64 (MySQL Community Server (GPL))
登录数据库,执行命令,均显示5.7.88版本
[mysql@cjc-db-01 ~]$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.88-log MySQL Community Server (GPL)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.88-log |
+------------+
1 row in set (0.00 sec)