def __get_connection_info():
 conn_info = {}
 try:
  conn_info['hostname'] = __opts__['mysql_auth']['hostname']
  conn_info['username'] = __opts__['mysql_auth']['username']
  conn_info['password'] = __opts__['mysql_auth']['password']
  conn_info['database'] = __opts__['mysql_auth']['database']
  conn_info['auth_sql'] = __opts__['mysql_auth']['auth_sql']
 except KeyError as e:
  log.error('{0} does not exist'.format(e))
  return None
 return conn_info

def __get_connection_info ( ) : conn_info = { } try : conn_info [ 'hostname' ] = __opts__ [ 'mysql_auth' ] [ 'hostname' ] conn_info [ 'username' ] = __opts__ [ 'mysql_auth' ] [ 'username' ] conn_info [ 'password' ] = __opts__ [ 'mysql_auth' ] [ 'password' ] conn_info [ 'database' ] = __opts__ [ 'mysql_auth' ] [ 'database' ] conn_info [ 'auth_sql' ] = __opts__ [ 'mysql_auth' ] [ 'auth_sql' ] except KeyError as e : log . error ( '{0} does not exist' . format ( e ) ) return None return conn_info
grab mysql connection details .