• Resolved Kodie Grantham

    (@kodiegrantham)


    When using the WP Security Audit log plugin on a site that’s using MySQL v8, the WP logs are flooded with this error:

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"wp_wsal_options"' at line 1 for query SHOW TABLES LIKE "wp_wsal_options" made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WpSecurityAuditLog->setup, WpSecurityAuditLog->load_wsal, WpSecurityAuditLog->SetGlobalOption, WSAL_Models_Option->SetOptionValue, WSAL_Adapters_MySQL_Option->GetNamedOption, WSAL_Adapters_MySQL_ActiveRecord->IsInstalled

    I was able to fix this in classes/Adapters/MySQL/ActiveRecordAdapter.php, by changing this line in the isInstalled() function:

    $sql = 'SHOW TABLES LIKE "' . $this->GetTable() . '"';
    to
    $sql = 'SHOW TABLES LIKE \'' . $this->GetTable() . '\'';

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support robertabela

    (@robert681)

    Thank you for reporting this @kodiegrantham

    We are aware of this issue and are currently working on a fix that will be available with the next update.

    If you want we can send you a patch. Please send us an email on [email protected].

    Looking forward to hearing from you and have a good day.

    Thread Starter Kodie Grantham

    (@kodiegrantham)

    That is good to hear. We also noticed some instability with the plugin running on MySQL 8. It would often cause our website to timeout with a 504 error and the Query Monitor plugin reported that the Security Audit plugin was often taking around 20 seconds to finish requests from the database. We have disabled the plugin in the meantime but hopefully these issues will be fixed in a future update so that we can continue using it.

    Plugin Support robertabela

    (@robert681)

    Thank you for the feedback @kodiegrantham

    Next week we are releasing update 3.5.2 which includes a fix for MySQL 8. Please install that update and let us know how it works.

    Plugin Support robertabela

    (@robert681)

    Hello @kodiegrantham update 3.5.2 was released last week. Please let us know if you still have issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘MySQL 8 errors’ is closed to new replies.