What command returns the current version of a MySQL database?
E:\>mysql -u root -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1026
Server version: 5.6.34-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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.
mysql> select @@version;
+------------+
| @@version |
+------------+
| 5.6.34-log |
+------------+
1 row in set (0.00 sec)
try
mysql --version
for instance. Or dpkg -l 'mysql-server*'
.
From the console you can try:
mysqladmin version -u USER -p PASSWD
Simply login to the Mysql with
mysql -u root -p
Then type in this command
select @@version;
This will give the result as,
+-------------------------+
| @@version |
+-------------------------+
| 5.7.16-0ubuntu0.16.04.1 |
+-------------------------+
1 row in set (0.00 sec)
Go to MySQL workbench and log to the server. There is a field called Server Status under MANAGEMENT. Click on Server Status and find out the version.
Or else go to following location and open cmd -> C:\Windows\System32\cmd.exe. Then hit the command -> mysql -V
You can also look at the top of the MySQL shell when you first log in. It actually shows the version right there.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 67971
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, 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.
mysql>