[英]MySQL: check what version : 32 bit or 64 bit?
我可以告訴我使用終端運行的 MySQL 的哪個版本(32 位或 64 位)?
$ 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
--------------
在命令行中運行此命令:
mysql> show variables like 'version_compile_machine';
然后你會得到這樣的東西:
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| version_compile_machine | i386 |
+-------------------------+-------+
1 row in set (0.00 sec)
然后請檢查: http://www.redhat.com/archives/rhl-list/2006-October/msg03684.html
你會看到 i386/i686 是 32 位的,而 x86_64 是 64 位的。
希望這可以幫助。
運行命令行 MySQL 客戶端:
mysql> select version();
或者
mysql> \s
這是一個別名:
mysql> status
您可以嘗試以下命令:(無需登錄)
mysql -V
要了解您的 Mysql 位架構,請按照此步驟操作。 從 phpmyadmin 打開 Mysql 控制台
現在輸入密碼后輸入此命令
顯示像'version_compile_machine'這樣的全局變量;
如果 version_compile_machine = x86_64 那么它是 64 位
否則 32 位。
在 Windows 中使用 --version 參數獲取 mysql 版本:
C:\>C:\xampp\mysql\bin\mysql.exe --V
C:\xampp\mysql\bin\mysql.exe Ver 14.14 Distrib 5.6.11, for Win32 (x86)
在 Windows 中通過自定義查詢獲取 mysql 版本:
C:\>C:\xampp\mysql\bin\mysql.exe
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.11 |
+-----------+
1 row in set (0.00 sec)
mysql>
使用服務器變量獲取 Windows 中的 mysql 版本:
mysql> select @@Version;
+-----------+
| @@Version |
+-----------+
| 5.6.11 |
+-----------+
1 row in set (0.00 sec)
mysql>
在 Windows 中獲取帶有\s
標志的 mysql 版本。
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
--------------
我也在搜索這個(連接到mysql的核心轉儲問題),上面的答案似乎都沒有正確回答這個問題:例如mysql版本信息不包括構建類型32或64位。
發現這個 capttofu:我有 32 位還是 64 位 MySQL? captoflu它使用一個簡單的“文件”命令來告訴你正在運行什么構建,在我的例子中。
BensAir:~ Ben$ /usr/local/mysql/bin/mysqld --verbose --help
file /usr/local/mysql/bin/mysqld
/usr/local/mysql/bin/mysqld: Mach-O 64-bit executable x86_64
無需登錄(OS X 10.11)。
$ /usr/local/mysql/bin/mysqld --version
使用@@version
服務器變量。
select @@version;
這是我在服務器上得到的:
mysql> select @@version;
+-----------------+
| @@version |
+-----------------+
| 5.0.67-0ubuntu6 |
+-----------------+
1 row in set (0.00 sec)
希望能幫助到你。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.