code: def db_list(**connection_args):
      '''
      Return a list of databases of a MySQL server using the output
      from the ``SHOW DATABASES`` query.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' mysql.db_list
      '''
      dbc = _connect(**connection_args)
      if dbc is None:
          return []
      cur = dbc.cursor()
      qry = 'SHOW DATABASES'
      try:
          _execute(cur, qry)
      except MySQLdb.OperationalError as exc:
          err = 'MySQL Error {0}: {1}'.format(*exc.args)
          __context__['mysql.error'] = err
          log.error(err)
          return []
  
      ret = []
      results = cur.fetchall()
      for dbs in results:
          ret.append(dbs[0])
  
      log.debug(ret)
      return ref db_list(**connection_args):
      '''
      Return a list of databases of a MySQL server using the output
      from the ``SHOW DATABASES`` query.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' mysql.db_list
      '''
      dbc = _connect(**connection_args)
      if dbc is None:
          return []
      cur = dbc.cursor()
      qry = 'SHOW DATABASES'
      try:
          _execute(cur, qry)
      except MySQLdb.OperationalError as exc:
          err = 'MySQL Error {0}: {1}'.format(*exc.args)
          __context__['mysql.error'] = err
          log.error(err)
          return []
  
      ret = []
      results = cur.fetchall()
      for dbs in results:
          ret.append(dbs[0])
  
      log.debug(ret)
      return ret
docs: Return a list of databases of a MySQL server using the output
      from the ``SHOW DATABASES`` query.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' mysql.db_list