Question

Managed MySQL: Failed to create table

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Accepted Answer

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 ?

@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