Error: “#1071 – Specified key was too long; max key length is 767 bytes” when import mysql db

When import db to MySQL, if it has error: #1071 – Specified key was too long; max key length is 767 bytes.

Go SQL command to run some query to fix it.

use my_database_name;

set global innodb_large_prefix=on;

set global innodb_file_format=Barracuda;

set global innodb_file_per_table=true;

And import again. 🙂

=================================

You can also watch video to fix it easily:

Fixed: 767 bytes error video

Advertisements