Query method: 1. Log in to mysql with the command line and obtain the version number from the output information; 2. Use navicat to connect to mysql, right-click and select "Details" to view the version number information in the pop-up window; 3. Execute the "select version();" statement to query; 4. Execute the "status" statement to query.
The operating environment of this tutorial: linux5.9.8 system, mysql version 5.7.17, Dell G3 computer.
1. Log in to mysql on the command line and you can see the version number of mysql
[root@heyong ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 487032Server version: 5.7.17 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. 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>
2. Use navicat to connect to the mysql client tool to view
After connecting, right-click - details Information
3. Use the mysql command to view
mysql> select version(); +-----------+ | version() | +-----------+ | 5.7.17 | +-----------+ 1 row in set (0.01 sec) mysql>
4
4. Use status on the command line to view
mysql> status -------------- mysql Ver 14.14 Distrib 5.7.17, for linux-glibc2.5 (x86_64) using EditLine wrapper Connection id: 488398 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.7.17 MySQL Community Server (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /tmp/mysql.sock Uptime: 5 days 10 hours 5 min 40 sec Threads: 154 Questions: 15051829 Slow queries: 0 Opens: 37599 Flush tables: 11 Open tables: 1563 Queries per second avg: 32.138 -------------- mysql>
5. Use mysql --help | grep Distrib view
[root@heyong tools]# mysql --help | grep Distrib mysql Ver 14.14 Distrib 5.7.17, for linux-glibc2.5 (x86_64) using EditLine wrapper
[Related recommendations: mysql video tutorial]
The above is the detailed content of How to query the version number of mysql. For more information, please follow other related articles on the PHP Chinese website!