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条回答
可以哭但决不认输i
2楼-- · 2019-03-12 00:00

Use @@version server variable.

select @@version;

This is what I get on my server:

mysql> select @@version;
+-----------------+
| @@version       |
+-----------------+
| 5.0.67-0ubuntu6 |
+-----------------+
1 row in set (0.00 sec)

Hope it helps.

Here's a list of all server variables.

查看更多
迷人小祖宗
3楼-- · 2019-03-12 00:01

To know your Mysql bit architecture please follow this step. Open Mysql console from phpmyadmin

Now after entering password type this command

show global variables like 'version_compile_machine';

if version_compile_machine = x86_64 then it is 64 bit

else 32 bit.

查看更多
4楼-- · 2019-03-12 00:06

You could try the command: (no login needed)

mysql -V
查看更多
唯我独甜
5楼-- · 2019-03-12 00:13

run this command in command line:

mysql> show variables like 'version_compile_machine';

then you get something like this:

+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| version_compile_machine | i386  |
+-------------------------+-------+
1 row in set (0.00 sec)

and then please check this: http://www.redhat.com/archives/rhl-list/2006-October/msg03684.html

you'll see that i386/i686 are 32 bit, and x86_64 is 64 bit.

Hope this helps.

查看更多
叛逆
6楼-- · 2019-03-12 00:13

I was searching for this also (core dump issues connecting to mysql) and it seemed none of the above answers properly answered the question: e.g. mysql version info doesn't include the build type 32or 64 bit.

found this capttofu: Do I have a 32-bit or 64-bit MySQL? captoflu which uses a simple "file" command to tell what build youre running, in my case.

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
查看更多
smile是对你的礼貌
7楼-- · 2019-03-12 00:13

No login is needed (OS X 10.11).

$ /usr/local/mysql/bin/mysqld --version
查看更多
登录 后发表回答