0

I'm trying to clone a MySql database to another server using MySQL Workbench.

I can use Data Export to export the file to a standalone file:

Dumping lti_dev (lti_board_pack, ...)
Running: mysqldump.exe --defaults-file="c:\users\kevin\appdata\local\temp\tmplg3ejq.cnf"  --user=xxx --host=111.2.33.44 --protocol=tcp --port=3306 --default-character-set=utf8 --single-transaction=TRUE --routines --events "lti_dev"
09:35:07 Export of \\...\lti_dev8.sql has finished

But my Data Import fails due to a too long index:

Restoring \\...\lti_dev8.sql
Running: mysql.exe --defaults-file="c:\users\kevin\appdata\local\temp\tmp5zgghx.cnf"  --protocol=tcp --host=foo.bar.local --user=xxx --port=3306 --default-character-set=utf8 --comments  < "\\...\\lti_dev8.sql"
ERROR 1071 (42000) at line 27: Specified key was too long; max key length is 767 bytes

I've looked at #1071 - Specified key was too long; max key length is 767 bytes but I don't see how that would apply to my problem. I do have one index defined as varchar(512) and one as varchar(255) but both the import and export calls define the characters as UTF-8.

Moreover, I'm cloning a working production database. So it's working, but I can't clone it to another server.

What's going on?

empty
  • 5,194
  • 3
  • 32
  • 58
  • 1
    maybe a different MySQL version?. (like in the link you provided: "In MySQL version 5.7 and upwards this limit has been increased to 3072 bytes.") – Roland Starke Feb 23 '18 at 18:06
  • 1
    @RolandStarke You may be onto something there. My "from" is 5.7 and my "to" is 5.5. – empty Feb 23 '18 at 18:49
  • @RolandStarke, yes that was the answer. Put it in a post and I'll mark it as the answer. – empty Feb 23 '18 at 21:21

0 Answers0