code: def get_audits():
      
      if subprocess.call(['which', 'mysql'], stdout=subprocess.PIPE) != 0:
          log("MySQL does not appear to be installed on this node - "
              "skipping mysql hardening", level=WARNING)
          return []
  
      settings = utils.get_settings('mysql')
      hardening_settings = settings['hardening']
      my_cnf = hardening_settings['mysql-conf']
  
      audits = [
          FilePermissionAudit(paths=[my_cnf], user='root',
                              group='root', mode=0o0600),
  
          TemplatedFile(hardening_settings['hardening-conf'],
                        MySQLConfContext(),
                        TEMPLATES_DIR,
                        mode=0o0750,
                        user='mysql',
                        group='root',
                        service_actions=[{'service': 'mysql',
                                          'actions': ['restart']}]),
  
          # MySQL and Percona charms do not allow configuration of the
          # data directory, so use the default.
          DirectoryPermissionAudit('/var/lib/mysql',
                                   user='mysql',
                                   group='mysql',
                                   recursive=False,
                                   mode=0o755),
  
          DirectoryPermissionAudit('/etc/mysql',
                                   user='root',
                                   group='root',
                                   recursive=False,
                                   mode=0o700),
      ]
  
      return audits
docs: Get MySQL hardening config audits.
  
      :returns:  dictionary of audits