Home  >  Article  >  Database  >  How to check mysql version

How to check mysql version

hzc
hzcOriginal
2020-06-09 15:23:015816browse

How to check mysql version

How to check the mysql version:

1 Log in to mysql on the command line and you can see the mysql version number

[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>

How to check mysql version

2. Use the mysql command to view

mysql> select version();+-----------+
| version() |
+-----------+
| 5.7.17    |
+-----------+1 row in set (0.01 sec)
mysql>

How to check mysql version

3. Use mysql --help | grep Distrib to 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

How to check mysql version

recommended Tutorial: "mysql tutorial"

The above is the detailed content of How to check mysql version. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn