Error: Specified key was too long; max key length is 767 bytes
Posted: Wed Aug 10, 2022 11:02 am
In case you see this error during the import of the database:
Specified key was too long; max key length is 767 bytes
or
Index column size too large. The maximum column size is 767 bytes:
Those are steps to fix this:
1. In your SSH, as root, run:
At the end of this file add this:
2. After that restart MySQL server:
3. At the end, in the table where the error code is shown, run this SQL query:
Specified key was too long; max key length is 767 bytes
or
Index column size too large. The maximum column size is 767 bytes:
Those are steps to fix this:
1. In your SSH, as root, run:
Code: Select all
vi /etc/mysql/mariadb.cnf
Code: Select all
innodb-file-format=barracuda
innodb-file-per-table=ON
innodb-large-prefix=ON
innodb_default_row_format = 'DYNAMIC'
Code: Select all
systemctl restart mysql
Code: Select all
ALTER TABLE `table_name` ROW_FORMAT=DYNAMIC;