MySQL: check what version : 32 bit or 64 bit?

2019-03-11 23:42发布

Can I tell what version (32 bit or 64 bit) of MySQL I am running by using Terminal?

10条回答
该账号已被封号
2楼-- · 2019-03-12 00:17

You can use version():

SELECT version();

See more information here :)

查看更多
一纸荒年 Trace。
3楼-- · 2019-03-12 00:17

Running the command-line MySQL client:

mysql> select version();

OR

mysql> \s

which is an alias for:

mysql> status
查看更多
成全新的幸福
4楼-- · 2019-03-12 00:18
$ mysql --version
mysql  Ver 14.14 Distrib 5.1.45, for apple-darwin10.2.0 (i386) using readline 6.2


$ echo '\s' | mysql
--------------
mysql  Ver 14.14 Distrib 5.1.45, for apple-darwin10.2.0 (i386) using readline 6.2

Connection id:      105730
[...]
Server version:     5.1.41 MySQL Community Server (GPL)
[...]
Uptime:         11 days 4 hours 2 min 6 sec

Threads: 2  Questions: 1141270  Slow queries: 0  Opens: 6137  Flush tables: 1  Open tables: 56  Queries per second avg: 1.182
--------------
查看更多
甜甜的少女心
5楼-- · 2019-03-12 00:24

Get mysql version In Windows with --version parameter:

C:\>C:\xampp\mysql\bin\mysql.exe --V

C:\xampp\mysql\bin\mysql.exe  Ver 14.14 Distrib 5.6.11, for Win32 (x86)

Get mysql version In Windows with custom query:

C:\>C:\xampp\mysql\bin\mysql.exe

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.11    |
+-----------+
1 row in set (0.00 sec)

mysql>

Get mysql version in Windows with server variable:

mysql> select @@Version;
+-----------+
| @@Version |
+-----------+
| 5.6.11    |
+-----------+
1 row in set (0.00 sec)

mysql>

Get mysql version in Windows with \s flag.

mysql> \s

--------------
C:\xampp\mysql\bin\mysql.exe  Ver 14.14 Distrib 5.6.11, for Win32 (x86)

Connection id:          25
Current database:
Current user:           ODBC@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.6.11 MySQL Community Server (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    cp850
Conn.  characterset:    cp850
TCP port:               3306
Uptime:                 2 hours 48 min 52 sec

Threads: 1  Questions: 169  Slow queries: 0  Opens: 75  Flush tables: 1  Open 
tables: 68  Queries per second avg: 0.016
--------------
查看更多
登录 后发表回答