If you want to check the server version of the mysql, this command also displays the current status of the mysql server.
# mysqladmin -u root version
mysqladmin Ver 8.42 Distrib 5.1.63, for unknown-linux-gnu on x86_64
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.
Server version 5.1.63-cll
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 2 hours 33 min 51 sec
Threads: 3 Questions: 1929 Slow queries: 0 Opens: 801 Flush tables: 1 Open tables: 64 Queries per second avg: 0.208
You can also use below command and check the version of the mysql.
# mysql -v
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 158
Server version: 5.1.63-cll MySQL Community Server (GPL)
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.
Reading history-file /root/.mysql_history
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.