0

Importing a mysqlnd (5.0.12) database to MySQL server (5.1.66) causes error? Currently we are performing this task and encountering errors (like below):

ERROR 1146 (42S02): Table 'xx-xxx-xxx-xxx' doesn't exist

ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_ci'

ERROR 1115 (42000): Unknown character set: 'utf8mb4'

asked Mar 8, 2016 at 9:12

2 Answers 2

0

The cause of the problems may be that the utf8mb4 character set has been added in Mysql 5.5.3.

You need to upgrade MySQL server or change your data to working with utf without mb4. Here you can find some tips how to do it

answered Mar 8, 2016 at 9:27
3
  • but there is no mention of 5.5.3 version in my question. the source and target db versions are different from 5.5.3 Commented Mar 8, 2016 at 9:34
  • if in source file this collation - You wrong about source version :-) or it was error when export (not sure how You do the export) Commented Mar 8, 2016 at 9:55
  • 1
    mysqlnd is a client library. Character set support is primarily a server feature. You have to check which server you used. MySQL 5.1 also is a very old version which is out of support or more than a year. 5.7 is current. Commented Mar 8, 2016 at 12:04
0

in additional to the answer about support utf8mb4 from MySQL 5.5,

the problem with collation You can resolve by edit(replace) all utf8mb4 to other utf collation. If file huge, You can use sed command for change string without open the file -

sed -i -- 's/utf8mb4/utf/g' file.sql

for ERROR 1146 (42S02): Table 'xx-xxx-xxx-xxx' doesn't exist - not all sql dump include create table instructions, best choice check the text of script, again if file huge - use

cat file.sql | grep -E 'xx-xxx-xxx-xxx' | grep -E 'CREATE' 

for check is it include in script or not

answered Mar 8, 2016 at 9:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.