Unknown character set: 'utf8mb4' - mysql

I know that many had this problem, and solved it, but even with their solutions, I've gotten no luck..
I tried exporting my localhost phpadmin to my webserver, and i got:
SQL query:
/*!40101 SET NAMES utf8mb4 */;
MySQL said: Documentation
#1115 - Unknown character set: 'utf8mb4'
Local phpmyadmin:
Server type: MariaDB
Server charset: UTF-8 Unicode (utf8)
Version: 4.5.2
Webhost phpmyadmin:
Version: 2.11.4

Solved it. Downloaded MYSQL workbench, logged into my local database, and exported it from the program. Then, i simply imported the file, and it worked!

Related

Unknown character set: 'utf8mb4'

im trying to upload my first wordpress website. Im using the local wordpress.org php my admin and the php my admin from 000webhost. Ive researched this a a lot here and changed all the settings people were saying from utf8mb4 to utf8 but it only caused more errors. I changed everything back to what it was (at least i think so and the error is the same as the beginning now). Anyone knows how i can get around this and import my db to 000.webhost with no errors? the Error is SQL query:
/*!40101 SET NAMES utf8mb4 */;
and
MySQL said: Documentation
1115 - Unknown character set: 'utf8mb4'
1) The first: If you can control ssh server. Please update mysql version. Your mysql too old. Maybe < 5.5.3.
2) The second: If you can't access ssh. Try to export your database with Mysql version 4.0.
With command line mysqldump --compatible=mysql40 -u user -p DB > dumpfile.sql
With web access phpmyadmin -> Select Database -> Export -> Custom - display all possible options -> Format-specific options ->
Database system or older MySQL server to maximize output compatibility with: Select MYSQL40.
Change content file .sql you exported
/*!50003 SET character_set_client = utf8mb4 */ ;
to utf8 only.
And replace by Ctrl H in Sublime change all from utf8mb4 => utf8
Hope this helps.
Just modify this into mysql Database.
wrong that modify ..... /*!40101 SET NAMES utf8mb4 /;
now corrected ..... /!40101 SET NAMES utf8 */;
just erase .... mb4 ....
its work now

Unknown character set utf8mb4

I'm developing my PHP apps on XAMMP on a usb stick, the character set is utf8_unicode_ci, when I exported the db and imported the SQL into my live server at OVH, it gave me this error:
1115 - Unknown character set: 'utf8mb4'
My XAMMP dev server DB version:
Server type: MariaDB
Server version: 10.1.13-MariaDB - mariadb.org binary distribution
My OVH live server version:
Server type: MySQL
Server version: 5.1.73 - Source distribution
No how to solve this? Thanks.
use my sql server 5.5.3 or newer, or replace all 'utf8mb4' to 'utf8' in your DB dump

How to downgrade the phpadmin in XAMPP

I am trying to connect to remote database server with phpadmin on my home system. My Server uses Mysql version 5.1.61 and this mysql version is very old for the new xampp phpadmin version. I am thinking to downgrade the phpadmin version in xammpp 5.6.8
But I am getting an error due to compatibility error.
Error:
SQL query: Edit Edit
SET CHARACTER SET 'utf8mb4';
MySQL said: Documentation
1115 - Unknown character set: 'utf8mb4'
"utf8mb4" is an extended character set used in Mysql 5.5.3 and higher. Try converting the DB to use utf8 only instead of utf8mb4.
Below URL might help.
http://ben.lobaugh.net/blog/201740/script-to-convert-mysql-collation-from-utf8mb4-to-utf8

Can't launch phpMyAdmin?

For some reason I can't launch pHp myadmin from XAMPP, I've tried different versions uninstalling and re installing wont launch. Give me the following error..
Error
SQL query: Edit Edit
SET CHARACTER SET 'utf8mb4';
MySQL said: Documentation
#1115 - Unknown character set: 'utf8mb4'
Any idea? Cheers
Your version of MySQL is too old for your version of phpMyAdmin. See the release history for phpMyAdmin version 4.2.3.
Either upgrade MySQL or downgrade phpMyAdmin.
Replacing utf8mb4 with utf8 should work.
utf8mb4 is a superset of utf8.

MySQL UTF8 Windows export - Linux import

I have MySQL database version 5.1.36, that came with WAMP installation. I used it for development purposes on Windows XP SP3, and it has some data in it, which is cyrillic, and the collation for all of those tables/columns is set to utf8_general_ci.
Now the time has come to move this database to pseudo-production environment, which is on Debian Lenny. Version of MySQL here is 5.0.51a.
I tried the following:
I exported the databse with data from phpmyadmin on Windows and saved the .sql file to be in UTF8.
Then, I transferred it through WinSCP (both with default and binary transfer settings) to Linux machine.
I created the database through command line: mysqladmin -u root -p create nbs
Finally, I tried to create tables and fill the data:
mysql -u root -p --default-character-set=utf8 nbs < NBS_utf8_1.sql
However, this is where I'm getting the error, like:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
CREATE TABLE IF NOT EXISTS `history_members` (
`id` int(11) NOT NULL AUTO_' at line 1
Something is messed up with encoding, I suppose... but don't know how and where. I think I read in the similar question on SO that binary mode for text transfer will only change the line breaks CRLF to LF (don't know if this is correct...). What am I missing here?
Thanks.
For this particular case, the problem was solved with the following modifications:
1) I set initial collation while creating the target database to utf8_general_ci,
2) I transferred the file with text mode through WinSCP,
3) I added SET NAMES 'utf8' COLLATE 'utf8_general_ci'; to the top of sql dump.
Here is what I found using PhpMyAdmin for a rough SQL import using remote shell :
/*!40101 SET #OLD_CHARACTER_SET_CLIENT=##CHARACTER_SET_CLIENT */;
/*!40101 SET #OLD_CHARACTER_SET_RESULTS=##CHARACTER_SET_RESULTS */;
/*!40101 SET #OLD_COLLATION_CONNECTION=##COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;