{"id":9868,"date":"2022-10-14T11:26:14","date_gmt":"2022-10-14T11:26:14","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=9868"},"modified":"2022-10-14T12:10:43","modified_gmt":"2022-10-14T12:10:43","slug":"wordpress-error-llegal-mix-of-collations","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/","title":{"rendered":"WordPress Error: llegal mix of collations"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Error<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<pre class=\"wp-block-code\"><code>WordPress database error: &#91;Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation 'like']\r\nSELECT `c`.`comment_author_email`, `c`.`comment_author`, COUNT(`c`.`comment_ID`) AS `count`, IFNULL(`s`.`count`, 0) AS `scount`, IFNULL(`fi`.`count`, 0) AS `ficount`, IFNULL(`fw`.`count`, 0) AS `fwcount`, MAX(`c`.`comment_date_gmt`) AS `last_date` FROM `wp_comments` AS `c` LEFT JOIN (SELECT `email`, COUNT(`email`) AS `count` FROM `wp_wc_comments_subscription` WHERE `confirm` = 1 GROUP BY `email`) AS `s` ON `s`.`email` LIKE `c`.`comment_author_email` LEFT JOIN (SELECT `follower_email`, COUNT(`follower_email`) AS `count` FROM `wp_wc_follow_users` WHERE `confirm` = 1 GROUP BY `follower_email`) AS `fi` ON `fi`.`follower_email` LIKE `c`.`comment_author_email` LEFT JOIN (SELECT `user_email`, COUNT(`user_email`) AS `count` FROM `wp_wc_follow_users` WHERE `confirm` = 1 GROUP BY `user_email`) AS `fw` ON `fw`.`user_email` LIKE `c`.`comment_author_email` WHERE `c`.`comment_approved` = '1' GROUP BY `c`.`comment_author_email`, `c`.`comment_author` ORDER BY `count` DESC LIMIT 7 OFFSET 0;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">DELETE comments table and follow this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>And remove the sql_mode \"NO_ZERO_IN_DATE,NO_ZERO_DATE\" to make it work. This is the default sql_mode in mysql new versions.\r\n\r\nYou can set sql_mode globally as root by command:\r\n\r\nset global sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';\n\n\ncreate table wp_comments\r\n(\r\n    comment_ID           bigint unsigned auto_increment\r\n        primary key,\r\n    comment_post_ID      bigint unsigned default 0                     not null,\r\n    comment_author       tinytext                                      not null,\r\n    comment_author_email varchar(100)    default ''                    not null,\r\n    comment_author_url   varchar(200)    default ''                    not null,\r\n    comment_author_IP    varchar(100)    default ''                    not null,\r\n    comment_date         datetime        default '0000-00-00 00:00:00' not null,\r\n    comment_date_gmt     datetime        default '0000-00-00 00:00:00' not null,\r\n    comment_content      text                                          not null,\r\n    comment_karma        int             default 0                     not null,\r\n    comment_approved     varchar(20)     default '1'                   not null,\r\n    comment_agent        varchar(255)    default ''                    not null,\r\n    comment_type         varchar(20)     default 'comment'             not null,\r\n    comment_parent       bigint unsigned default 0                     not null,\r\n    user_id              bigint unsigned default 0                     not null\r\n)\r\n    engine = InnoDB\r\n    collate = utf8mb4_unicode_ci;\r\n\r\ncreate index comment_approved_date_gmt\r\n    on wp_comments (comment_approved, comment_date_gmt);\r\n\r\ncreate index comment_author_email\r\n    on wp_comments (comment_author_email(10));\r\n\r\ncreate index comment_date_gmt\r\n    on wp_comments (comment_date_gmt);\r\n\r\ncreate index comment_parent\r\n    on wp_comments (comment_parent);\r\n\r\ncreate index comment_post_ID\r\n    on wp_comments (comment_post_ID);\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Reference<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/stackoverflow.com\/questions\/62663791\/my-sql-said-1067-invalid-default-value-for-user-registered<\/li><li>https:\/\/wordpress.org\/support\/topic\/wordpress-database-error-illegal-mix-of-collations-9\/<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Error Solution DELETE comments table and follow this Reference https:\/\/stackoverflow.com\/questions\/62663791\/my-sql-said-1067-invalid-default-value-for-user-registered https:\/\/wordpress.org\/support\/topic\/wordpress-database-error-illegal-mix-of-collations-9\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9868","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Wordpress Error: llegal mix of collations - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Wordpress Error: llegal mix of collations - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Error Solution DELETE comments table and follow this Reference https:\/\/stackoverflow.com\/questions\/62663791\/my-sql-said-1067-invalid-default-value-for-user-registered https:\/\/wordpress.org\/support\/topic\/wordpress-database-error-illegal-mix-of-collations-9\/\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-14T11:26:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-14T12:10:43+00:00\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"WordPress Error: llegal mix of collations\",\"datePublished\":\"2022-10-14T11:26:14+00:00\",\"dateModified\":\"2022-10-14T12:10:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/\"},\"wordCount\":27,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/\",\"name\":\"Wordpress Error: llegal mix of collations - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2022-10-14T11:26:14+00:00\",\"dateModified\":\"2022-10-14T12:10:43+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wordpress-error-llegal-mix-of-collations\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Error: llegal mix of collations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Wordpress Error: llegal mix of collations - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/","og_locale":"en_US","og_type":"article","og_title":"Wordpress Error: llegal mix of collations - scmGalaxy","og_description":"Error Solution DELETE comments table and follow this Reference https:\/\/stackoverflow.com\/questions\/62663791\/my-sql-said-1067-invalid-default-value-for-user-registered https:\/\/wordpress.org\/support\/topic\/wordpress-database-error-illegal-mix-of-collations-9\/","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/","og_site_name":"scmGalaxy","article_published_time":"2022-10-14T11:26:14+00:00","article_modified_time":"2022-10-14T12:10:43+00:00","author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"WordPress Error: llegal mix of collations","datePublished":"2022-10-14T11:26:14+00:00","dateModified":"2022-10-14T12:10:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/"},"wordCount":27,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/","name":"Wordpress Error: llegal mix of collations - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2022-10-14T11:26:14+00:00","dateModified":"2022-10-14T12:10:43+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/wordpress-error-llegal-mix-of-collations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"WordPress Error: llegal mix of collations"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/9868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=9868"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/9868\/revisions"}],"predecessor-version":[{"id":9871,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/9868\/revisions\/9871"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=9868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=9868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=9868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}