phpmysql error - #1273 - #1273 - Unknown collation: 'utf8mb4_general_ci'
This solution worked for me
1) Click the "Export" tab for the database
2) Click the "Custom" radio button
3) Go the section titled "Format-specific options" and change the dropdown for "Database system or older MySQL server to maximize output compatibility with:" from NONE to MYSQL40.
4) Scroll to the bottom and click "GO".
If it's related to wordpress, more info on why it is happening.
You can fix this issue by deleting browser cookie from the begining of time. I have tried this and it is working fine for me.
To delete only cookies:
- hold down ctrl+shift+delete
- remove all check boxes except for cookies of course
- use the drop down on top to select "from the beginning of time
- click clear browsing data
There are two steps to fix this.
First edit phpMyAdmin/libraries/DatabaseInterface.class.php
Change:
if (PMA_MYSQL_INT_VERSION > 50503) {
$default_charset = 'utf8mb4';
$default_collation = 'utf8mb4_general_ci';
} else {
$default_charset = 'utf8';
$default_collation = 'utf8_general_ci';
}
To:
//if (PMA_MYSQL_INT_VERSION > 50503) {
// $default_charset = 'utf8mb4';
// $default_collation = 'utf8mb4_general_ci';
//} else {
$default_charset = 'utf8';
$default_collation = 'utf8_general_ci';
//}
Then delete this cookie from your browser "pma_collation_connection".
Or delete all Cookies.
Then restart your phpMyAdmin.
(It would be nice if phpMyAdmin allowed you to set the charset and collation per server in the config.inc.php)
When you export you use the compatibility system set to MYSQL40
. Worked for me.
I had read yesterday that the issue was fixed for someone when that person cleared cookies. I had tried that but it did not work for me.
Checking the following section in DatabaseInterface.class.php,
define(
'PMA_MYSQL_INT_VERSION',
PMA_Util::cacheGet('PMA_MYSQL_INT_VERSION', true)
);
I figured that somehow cache is the problem. So, I remembered that I was restarting the service instead of doing a start
and stop
.
# restart the service
systemd restart php-fpm
# start and stop the service
systemd stop php-fpm
systemd start php-fpm
Doing a stop
followed by a start
fixed the issue for me.