def _get_mysql_db_version():
 from django.db import connection
 conn = connection.cursor()
 conn.execute('SELECT VERSION()')
 version = conn.fetchone()
 return ((version and str(version[0])) or '')

def _get_mysql_db_version ( ) : from django . db import connection conn = connection . cursor ( ) conn . execute ( 'SELECT VERSION()' ) version = conn . fetchone ( ) return ( ( version and str ( version [ 0 ] ) ) or '' )
this is a helper method for specifically getting the version string of a mysql database .