mysql> CREATE TABLE test -> ( -> id INT NOT NULL auto_increment, -> name VARCHAR(64), -> email VARCHAR(320) NOT NULL, -> password VARCHAR(32) NOT NULL, -> primary key (id) -> ); Query OK, 0 rows affected (0.00 sec) mysql> ALTER TABLE test ADD CONSTRAINT uq_test UNIQUE KEY (email, password); ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes mysql>