mysql versions code example
Example 1: mysql version
mysql --version
mysql -V
SHOW VARIABLES LIKE ‘%version%’;
Example 2: what is my mysql version
Mysql version
mysql -V
Example 3: mysql version
mysqld --version
Example 4: mean mysql
avg(column)
Example 5: python and mysql connectivity
import pymysql
db = pymysql.connect("database_host","username","password","database_name")
cursor = db.cursor()
cursor.execute("SELECT VERSION()")
data = cursor.fetchone()
print ("Database version : {0}".format(data))
db.close()