MyBB Community Forums

Full Version: Database move error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello
I will move my mybb database of "Direct Admin" to "CPanel"
But while I import database file to new host in CPanel apear bellow error and does not beĀ import:

ERROR 1115 (42000) at line 28: Unknown character set: 'utf8mb4'
[root@ip-164-241-200-193 home]#

Please help me
Thank you
You need MySQL 5.5.3 to support utf8mb4. Either upgrade it if you can or try changing the encoding to utf8 (or reexporting with this encoding).
Thank you for answer
How can I found it and change encoding it to utf8?
For example by running the 1st query before exporting it on the other host (if you still have access):
ALTER DATABASE nameofyourdatabase CHARACTER SET utf8 COLLATE utf8_unicode_ci;
I do this query in phpMyAdmin

" Your SQL query has been executed successfully ( Query took 0.0002 sec )
ALTER DATABASE caspiana_forum CHARACTER SET utf8 COLLATE utf8_unicode_ci; "

Now i must Export again and then import in new host?
Yes

EDIT: oh, I forgot that changing tables individually may be required too, if you changed them to utf8mb4 earlier too.
Oh, so how I can change them individually?
You can try running this query: http://stackoverflow.com/a/19301922
It query is:
___________________________________
SELECT CONCAT("ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CHARACTER SET utf8 COLLATE utf8_general_ci; ",
"ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ")
AS alter_sql
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = your_database_name;
_________________________________

How i replace my database name in this query?
my database name is "caspiana_forum"
Replace your_database_name with your database name
Pages: 1 2 3