Tom Juergens
Tom Juergens

Reputation: 4592

Which version is my MySQL Server?

What's the query syntax to determine the exact version number of the MySQL server software?

Upvotes: 9

Views: 4876

Answers (4)

Nikola
Nikola

Reputation: 15038

Besides the already mentioned solutions you can simply see the version if you type mysql in your shell. You will get something like this:

[nikola@localhost]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 386102
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Where you can see that the version is printed in the line Server version: 5.1.61 Source distribution.

Upvotes: 1

Pawka
Pawka

Reputation: 2576

Command line:

mysql --version

Upvotes: 2

Gennady Shumakher
Gennady Shumakher

Reputation: 5746

select version();

Upvotes: 3

Greg
Greg

Reputation: 321678

You can use SHOW VARIABLES:

SHOW VARIABLES WHERE Variable_name = 'version';

Upvotes: 13

Related Questions