You can check for your version of MySQL on the command line with the following:
# mysql –version
or
# mysql -V
I tried to search checking mysql version on the command line a couple times without success, so it’s going down here. The smart person would of course just read the mysql man page.
–version, -V
Display version information and exit.
3 Responses to “How to Check MySQL Version on Command Line”
Omid
That’s not entirely correct.
“mysql -version” or “mysql -V” show the version of the MySQL CLIENT and NOT the SERVER.
To see the server version, after you have logged in to the MySQL, you can run the following SQL:
SHOW VARIABLES LIKE “%version%”;
sahil
mysql> select version(); provides the version of mysql, am I right?
Chetan
Exactly…
select version(); provides the version.. It gives like this..
mysql> select version();
+———–+
| version() |
+———–+
| 5.5.27 |
+———–+
1 row in set (0.00 sec)