I am trying to use phpMyAdmin to access a remote MySQL database so I created a config.inc.php file (copying config.sample.inc.php) and added a server. Now this other server appear as an option in the login page but when connecting I receive this error: MySQL said #1115 - Unknown character set: 'utf8mb4'. Is there a workaround? Is there a configuration I can set? Any help highly appreciated.
-
possible duplicate of [ERROR 1115 (42000) : Unknown character set: 'utf8mb4' in mysql](http://stackoverflow.com/questions/21911733/error-1115-42000-unknown-character-set-utf8mb4-in-mysql) – T.Todua Jun 05 '14 at 07:37
9 Answers
OPEN
C:\wamp\apps\phpmyadmin4.1.14\libraries\DatabaseInterface.class.php
search for 'utf8mb4'
and replace it with 'utf8'
in two consecutive lines like below
$default_charset = 'utf8';
$default_collation = 'utf8_general_ci';

- 6,322
- 2
- 22
- 41

- 81
- 1
- 1
Edit the following files:
<install path>/libraries/DatabaseInterface.class.php
<install path>/libraries/mysql_charsets.lib.php
And change all instances of 'utf8mb4' to 'utf8'.
It seems to have worked for me.

- 827
- 8
- 18
If you've already edited the lines in the files mentioned in RAHUL-BHOLA and Shane's answers:
<install path>/libraries/DatabaseInterface.class.php
<install path>/libraries/mysql_charsets.lib.php
And are still getting this error, and you're exporting a database from one phpMyAdmin installation to another phpMyAdmin installation, you can fix the error by deleting the following line in the .sql export file:
/*!40101 SET NAMES utf8mb4 */;

- 1
- 1

- 1,823
- 1
- 16
- 31
If you want to force export as well. You must edit file:
<install path>/libraries/plugins/export/ExportSql.class.php
and comment out following (from line 740) :
if ($set_names == 'utf8' && PMA_MYSQL_INT_VERSION > 50503) {
$set_names = 'utf8mb4';
}
This will force export in SQL to be what you want to be. But you must first do changes in files (as was mentioned before)
<install path>/libraries/DatabaseInterface.class.php
<install path>/libraries/mysql_charsets.lib.php
New forced encoding in phpmyadmin is a pain in ass, because not all web hosting do recent updates. Such a stupid design!

- 86
- 2
There is an incompatibility with phpMyAdmin 4.1.x and MySQL <= 5.5
Install phpMyAdmin 4.0.x

- 1,927
- 2
- 19
- 32
I found that changing a portion of code located in files such as:
<install path>/libraries/DatabaseInterface.class.php
<install path>/libraries/plugins/export/ExportSql.class.php
from
PMA_MYSQL_INT_VERSION > 50503
to
PMA_MYSQL_INT_VERSION > 55503
does the trick

- 136
- 6
Use firefox, if You can live with that.
I got this error on only one database with Chrome. Firefox worked fine. Chrome even worked fine with a master/master replika of the faled database.
The edit in DatabaseInterface.class.php mentioned above solved the issue for Chrome.

- 1,471
- 10
- 15
I have update the sql file that I exported by replacing
utf8mb4' to 'utf8'.
It worked for me. It happens due to improper mysql version.

- 1,515
- 20
- 16
Change at the time of export the old database: Database system or older MySQL server to maximize output compatibility with ->mysql 4
thats it

- 83
- 9