Check out example codes for "mysql version". It will help you in understanding the concepts better.

Code Example 1

# console
mysql --version
mysql -V

# sql query
SHOW VARIABLES LIKE ‘%version%’;

Code Example 2

mysqld --version

Learn ReactJs, React Native from akashmittal.com