웹이야기

MySQL 버전 확인 본문

D/MySQL

MySQL 버전 확인

yeon.Biju 2020. 3. 4. 11:11

MySQL 버전 확인하는 방법

 

 

1. 쿼리

mysql>select version();

+-----------+
| version() |
+-----------+
| 8.0.18    |
+-----------+
1 row in set (0.00 sec)

 

2. 콘솔상에서 로그인

   - 윈도우나 리눅스 모두 상관없이 로그인을 하면 버전 정보가 나온다.

C:\mysql-5.7.28-winx64\bin>mysql -uroot -p

 

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 376
Server version: 8.0.18 Source distribution

Copyright (c) 2000, 2019, 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.

 

3. 또 다른 쿼리가 있다. 

mysql> SHOW GLOBAL VARIABLES LIKE '%ver%';
+---------------------------------+--------------------------------------+
| Variable_name                   | Value                                |
+---------------------------------+--------------------------------------+
| binlog_gtid_simple_recovery     | ON                                   |
| character_set_server            | utf8                                 |
| collation_server                | utf8_general_ci                      |
| innodb_dedicated_server         | OFF                                  |
| innodb_force_recovery           | 0                                    |
| innodb_ft_server_stopword_table |                                      |
| innodb_version                  | 8.0.18                               |
| log_error_verbosity             | 2                                    |
| master_verify_checksum          | OFF                                  |
| myisam_recover_options          | OFF                                  |
| protocol_version                | 10                                   |
| relay_log_recovery              | OFF                                  |
| server_id                       | 1                                    |
| server_id_bits                  | 32                                   |
| server_uuid                     | 044cfcb0-3417-11ea-8dec-000c29a5cff5 |
| show_create_table_verbosity     | OFF                                  |
| slave_sql_verify_checksum       | ON                                   |
| slave_type_conversions          |                                      |
| tls_version                     | TLSv1,TLSv1.1,TLSv1.2,TLSv1.3        |
| version                         | 8.0.18                               |
| version_comment                 | Source distribution                  |
| version_compile_machine         | x86_64                               |
| version_compile_os              | Linux                                |
| version_compile_zlib            | 1.2.11                               |
+---------------------------------+--------------------------------------+
24 rows in set (0.00 sec)

 

* version_comment 에 Source distribution 도 맘에 든다. 

 

4. 터미널상에서 조회

#./mysql --version

./mysql  Ver 8.0.18 for Linux on x86_64 (Source distribution)

Comments