Normal import of SQL file
MySQL Error:
#1071 - Specified key was too long; max key length is 768 bytes
The Script will not execute correctly for some reason after this. Probably a Pyramid of breakdowns even tough just one error is popping up.
This error shows up at many places.


Quickfix 1:
This can be fixed/ignored if you OWN the MySQL Host like this:
set global innodb_large_prefix=ON;
Set global innodb_default_row_format=dynamic
Quickfix 2:
If you do not own the Host you can try to remove the collates from specific Queries; also DO NOT MIX COLLATES IN KEYS:

Hey @edenprojectde, Thanks for taking the time to report this issue.
- This is probably not exactly fixable by Directus; this is most probably a problem of the export schematic of phpMyAdmin/other CLI tools.
But I agree with you here. It is not the issue of Directus. It's the issue of the tool.
- This is probably solvable if a script would be added to export tables in Directus instead of phpMyAdmin.
This is in our queue. We are planning to add the functionality of import/export DB.
I made this script, it's currently really messy but it seems to give a reasonable output:
https://gist.github.com/edenprojectde/f752c29e514bca58ab432c227d973bc8
I will test this later when i got time. But this script generates an CREATE TABLE(with PK), and INSERT INTO with all the Data. Tough im unsure if MySQL needed Integer/Number Values to be parenthesesless. (dont have a sql server locally to test rn)
CREATE TABLE IF NOT EXISTS sprachen(
id int(15) unsigned NOT NULL AUTO_INCREMENT,
anzeigename varchar(200) NULL,
icon int(10) unsigned NULL,
PRIMARY KEY (id));
INSERT INTO sprachen (`id`, `anzeigename`, `icon`) VALUES (`1`, `Deutsch`, `5`);
INSERT INTO sprachen (`id`, `anzeigename`, `icon`) VALUES (`2`, `English`, `6`);
@edenprojectde - May I have an update on this?
It is not the issue of Directus. It's the issue of the tool.
IMO, we should close this.
As It is not the issue of Directus. It's the issue of the tool; I am closing this. Feel free to reopen it.