Title: MScan showing SQL error&#8230;
Last modified: August 31, 2022

---

# MScan showing SQL error…

 *  Resolved [pauhana](https://wordpress.org/support/users/pauhana/)
 * (@pauhana)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/)
 * Seeing the following message at the top of my dashboard:
 *  [You have an error in your SQL syntax; check the manual that corresponds to 
   your MariaDB server version for the right syntax to use near ” at line 16]
    CREATE
   TABLE svs_bpspro_mscan ( mscan_id bigint(20) NOT NULL auto_increment, mscan_status
   varchar(8) NOT NULL default ”, mscan_type varchar(16) NOT NULL default ”, mscan_path
   text NOT NULL, mscan_pattern text NOT NULL, mscan_skipped varchar(7) NOT NULL
   default ”, mscan_ignored varchar(6) NOT NULL default ”, mscan_db_table varchar(
   64) NOT NULL default ”, mscan_db_column varchar(64) NOT NULL default ”, mscan_db_pkid
   text NOT NULL, mscan_time datetime NOT NULL default ‘0000-00-00 00:00:00’, PRIMARY
   KEY (mscan_id), UNIQUE KEY id (mscan_id) ) COLLATE
 * I’d rather not deactivate the BPS plugin, but this is irritating. Please advise…

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15965481)
 * Check your wp-config.php file. You should see these 2 constants below in your
   wp-config.php file. If you don’t see them then add them. Also click the Reset
   MScan button.
 *     ```
       /** Database Charset to use in creating database tables. */
       define('DB_CHARSET', 'utf8');
   
       /** The Database Collate type. Don't change this if in doubt. */
       define('DB_COLLATE', '');
       ```
   
 *  Thread Starter [pauhana](https://wordpress.org/support/users/pauhana/)
 * (@pauhana)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15966547)
 * Sorry, where is the **Reset MScan** button exactly?
 * Thanks for the help. (The charset being used was not utf8; hopefully that change
   will resolve things…).
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15967278)
 * The Reset MScan button is near the top of the MScan page and to the right of 
   Start Scan and Stop Scan.
 *  Thread Starter [pauhana](https://wordpress.org/support/users/pauhana/)
 * (@pauhana)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15972339)
 * Ok. Changed the DB_CHARSET to UTF8 and ran “Reset MScan”. No difference, the 
   error still showing. Anything else I should try?
 * By the way, I am running under ClassicPress…
    -  This reply was modified 3 years, 9 months ago by [pauhana](https://wordpress.org/support/users/pauhana/).
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15972367)
 * What does “error still showing” mean? Are you currently debugging your site and
   displaying errors? When you are debugging be aware that debugging itself will
   cause errors.
 *  Thread Starter [pauhana](https://wordpress.org/support/users/pauhana/)
 * (@pauhana)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15972551)
 * No, I am not debugging my site. And by “error still showing” I mean that at the
   top of the dashboard, the error is still showing:
 *     ```
       [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ” at line 16]
       CREATE TABLE svs_bpspro_mscan ( mscan_id bigint(20) NOT NULL auto_increment, mscan_status varchar(8) NOT NULL default ”, mscan_type varchar(16) NOT NULL default ”, mscan_path text NOT NULL, mscan_pattern text NOT NULL, mscan_skipped varchar(7) NOT NULL default ”, mscan_ignored varchar(6) NOT NULL default ”, mscan_db_table varchar(64) NOT NULL default ”, mscan_db_column varchar(64) NOT NULL default ”, mscan_db_pkid text NOT NULL, mscan_time datetime NOT NULL default ‘0000-00-00 00:00:00’, PRIMARY KEY (mscan_id), UNIQUE KEY id (mscan_id) ) COLLATE
       ```
   
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15973821)
 * Ok so just change the constant values in your wp-config.php file to false. Most
   likely you have an older version of MariaDB that has known issues/bugs and that
   is why the php error is happening.
 *     ```
       define('WP_DEBUG', false);
       define('WP_DEBUG_LOG', false);
       define('WP_DEBUG_DISPLAY', false);
       ```
   
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-15973835)
 * Another possibility could be that you have mixed collation in your WP DB. If 
   you have a mixed DB collation problem then after fixing that uninstall and reinstall
   BPS.
 * > If you’re using PhpMyAdmin, you can now:
   > 1. Select the database.
   >  2. Click the “Operations” tab. 3. Under “Collation”
   > section, select the desired collation. 4. Click the “Change all tables collations”
   > checkbox. 5. A new “Change all tables columns collations” checkbox will appear.
   > 6. Click the “Change all tables columns collations” checkbox. 7. Click the “
   > Go” button.
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-16028992)
 * Assuming all questions have been answered – the thread has been resolved. If 
   the issue/problem is not resolved or you have additional questions about this
   specific thread topic then you can post them at any time. I still receive email
   notifications when threads have been resolved.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘MScan showing SQL error…’ is closed to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [AITpro](https://wordpress.org/support/users/aitpro/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/mscan-showing-sql-error/#post-16028992)
 * Status: resolved