MySQL:检查什么版本:32 位或 64 位?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7045295/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 20:50:49  来源:igfitidea点击:

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

mysqlterminalversion

提问by redconservatory

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

我可以使用终端告诉我正在运行的 MySQL 版本(32 位或 64 位)吗?

回答by dossy

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

回答by JohnnyHuo

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

然后请检查这个: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.

你会看到 i386/i686 是 32 位的,而 x86_64 是 64 位的。

Hope this helps.

希望这可以帮助。

回答by Sarfraz

You can use version():

您可以使用version()

SELECT version();

See more information here :)

在此处查看更多信息:)

回答by jches

Running the command-line MySQL client:

运行命令行 MySQL 客户端:

mysql> select version();

OR

或者

mysql> \s

which is an alias for:

这是一个别名:

mysql> status

回答by Adam Culp

You could try the command: (no login needed)

您可以尝试以下命令:(无需登录)

mysql -V

回答by Anil Chahal

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

要了解您的 Mysql 位架构,请按照此步骤操作。从 phpmyadmin 打开 Mysql 控制台

Now after entering password type this command

现在输入密码后输入此命令

show global variables like 'version_compile_machine';

显示全局变量,如“version_compile_machine”;

if version_compile_machine = x86_64 then it is 64 bit

如果 version_compile_machine = x86_64 那么它是 64 位

else 32 bit.

否则 32 位。

回答by Ben

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.

我也在搜索这个(连接到 mysql 的核心转储问题),似乎上述答案都没有正确回答这个问题:例如,mysql 版本信息不包括 32 位或 64 位的构建类型。

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

找到了这个 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

回答by Eric Leschinski

Get mysql version In Windows with --version parameter:

在 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)

Get mysql version In Windows with custom query:

使用自定义查询在 Windows 中获取 mysql 版本:

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:

使用服务器变量在 Windows 中获取 mysql 版本:

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

mysql>

Get mysql version in Windows with \sflag.

使用\s标志在 Windows 中获取 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
--------------

回答by Clay Sissing

No login is needed (OS X 10.11).

无需登录(OS X 10.11)。

$ /usr/local/mysql/bin/mysqld --version

回答by Pablo Santa Cruz

Use @@versionserver variable.

使用@@version服务器变量。

select @@version;

This is what Iget 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.

这是所有服务器变量的列表