Hello,

I’m using Managed MySQL and the OpenLiteSpeed WordPress 1-Click image. Enabling some css or js options in the bundled LSCache plugin shows the following error:

Failed to create table cssjs! SQL: CREATE TABLE IF NOT EXISTS `wp_litespeed_cssjs` (`id` bigint(20) NOT NULL AUTO_INCREMENT, `hash_name` varchar(60) NOT NULL COMMENT "hash.filetype", `src` text NOT NULL COMMENT "full url array set", `dateline` int(11) NOT NULL, `refer` varchar(255) NOT NULL COMMENT "The container page url", PRIMARY KEY (`id`), UNIQUE KEY `hash_name` (`hash_name`), KEY `dateline` (`dateline`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;.

Is there perhaps a Global SQL mode I may need to add (or remove) so the plugin can function correctly? Or perhaps something else that can be done?

My current Global SQL mode settings are:

ANSI_QUOTES
ERROR_FOR_DIVISION_BY_ZERO
IGNORE_SPACE 
NO_ENGINE_SUBSTITUTION 
NO_ZERO_DATE 
NO_ZERO_IN_DATE 
ONLY_FULL_GROUP_BY 
PIPES_AS_CONCAT 
REAL_AS_FLOAT 
STRICT_ALL_TABLES 
STRICT_TRANS_TABLES

Thank you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi,

What if you directly run

CREATE TABLE IF NOT EXISTS `wp_litespeed_cssjs` (`id` bigint(20) NOT NULL AUTO_INCREMENT, `hash_name` varchar(60) NOT NULL COMMENT "hash.filetype", `src` text NOT NULL COMMENT "full url array set", `dateline` int(11) NOT NULL, `refer` varchar(255) NOT NULL COMMENT "The container page url", PRIMARY KEY (`id`), UNIQUE KEY `hash_name` (`hash_name`), KEY `dateline` (`dateline`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;

in your database query via command line or phpmyadmin ?

  • I get the followinf error if I try to run it:

    ERROR 1064 (42000): 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 '"hash.filetype", `src` text NOT NULL COMMENT "full url array set", `dateline` in' at line 1
    

    After I enabled WP_DEBUG I’m also getting other similar errors throughout the LSCache control panel in wp admin (this is in the image optimization dashboard):

    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_litespeed_img_optm"' at line 1]
    SHOW TABLES LIKE "wp_litespeed_img_optm"
    
    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_litespeed_img_optming"' at line 1]
    SHOW TABLES LIKE "wp_litespeed_img_optming"
    
    

@PSNick seems I can not reply you within a reply

all commit in dev branch will roll into stable release , so when you see a new release in wp plugin page, just upgrade it , the fix will be included

Submit an Answer