Can I tell what version (32 bit or 64 bit) of MySQL I am running by using Terminal?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
$ 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 --------------
Method 2
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.
Method 3
You can use version()
:
SELECT version();
Method 4
Running the command-line MySQL client:
mysql> select version();
OR
mysql> s
which is an alias for:
mysql> status
Method 5
You could try the command: (no login needed)
mysql -V
Method 6
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.
Method 7
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
Method 8
Get mysql version In Windows with –version parameter:
C:>C:xamppmysqlbinmysql.exe --V C:xamppmysqlbinmysql.exe Ver 14.14 Distrib 5.6.11, for Win32 (x86)
Get mysql version In Windows with custom query:
C:>C:xamppmysqlbinmysql.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:xamppmysqlbinmysql.exe Ver 14.14 Distrib 5.6.11, for Win32 (x86) Connection id: 25 Current database: Current user: <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ac5cec8c9cae6e5e9ebe6e2e5f9fe">[email protected]</a> 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 --------------
Method 9
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.
Method 10
No login is needed (OS X 10.11).
$ /usr/local/mysql/bin/mysqld --version
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0