Illegal mix of collations using a function [closed]
Illegal mix of collations using a function [closed]
Illegal mix of collations using a function [closed]
It has happened to me a couple of times. This is what helped me. if you are uploading the .sql file which is compressed, try to import uncompressed .sql file. Try to export the .sql database again, this error also comes when the database wasn’t exported properly.
You can filter every database query with the hook query, for example like this: add_filter( ‘query’, function ( $query ) { return str_replace( ‘utf8mb4_unicode_ci’, ‘utf8_unicode_ci’, $query ); }); However, I would strongly recommend not to do this. Update your databases instead. The old utf8_* collations have very annoying limitations, and you will run into plugin … Read more
The problem was solved in the next update of WordPress. By the way if you still haven’t updated your version of WordPress: It’s enough to set DB_COLLATE in the wp-config.php: define(‘DB_COLLATE’, ‘utf8mb4_general_ci’); // on condition that your DB_CHARSET is ‘utf8mb4′ That’s it! The bug is hidden in the file \wp-includes\wp-db.php on the line 731 in … Read more
To move a site from localhost i usually do the following: 1, Install adminer plugin on your localhost (lets you download the database file) 2, Use an FTP to upload all files 3, Change the php config files details to work on host 4, Open the mysql file saved from Adminer and then edit the … Read more
It is totally essential to use utf8mb4 for your site to be secure and bug free in all wordpress versions since 4.2 and probably before that. You need to upgrade your mysql software to a newer version, or change whatever is need in its configuration to support it.
From quick check of the MySQL manual the database collation is only relevant for database–level operations (emphasis mine): For CREATE TABLE statements, the database character set and collation are used as default values for table definitions if the table character set and collation are not specified. To override this, provide explicit CHARACTER SET and COLLATE … Read more
This issue is as a result of your server not supporting the utf8mb4_unicode_520_ci collation type. To resolve this you should convert the collation for all tables with utf8mb4_unicode_520_ci to utf8_general_ci If you’re exporting through phpmyadmin, you can: Click the “Export” tab for the database Click the “Custom” radio button Go the section titled “Format-specific options” … Read more
I’m totally shocked. After hours of trying things and testing, I finally found the “Settings” then “Readings” option below: “Encoding for pages and feeds”. After changing from UTF-7 to UTF-8, everything looks good again. And even stranger, after changing it to UTF-8, the option disappears from the page. According to WordPress site, this option was … Read more
I`ve resolved this issue by enabling a newer version of PHP in my htaccess: AddHandler application/x-httpd-php55 .php