[ MySQL 5.5.54 : utf8mb4 ] Mysql2::Error: Specified key was too long; max key length is 767 bytes

Problem

Mysql2::Error: Specified key was too long; max key length is 767 bytes

Solution

mysql-server in Ubuntu 12.04.5 LTS will be version 5.5.54.

We need version 5.7.

$ wget http://dev.mysql.com/get/mysql-apt-config_0.8.0-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.0-1_all.deb
$ sudo apt-get update
$ sudo apt-get install mysql-server

Then

SET GLOBAL default_storage_engine = 'InnoDB';

 

Another Problem

Table ‘performance_schema.session_variables’ doesn’t exist

Solution

mysql_upgrade -u root -p --force

sudo /etc/init.d/mysql restart

 

ref : https://askubuntu.com/questions/750498/mysql-5-5-update-to-mysql-5-7,

http://stackoverflow.com/questions/6172798/mysql-varchar255-utf8-is-too-long-for-key-but-max-length-is-1000-bytes,

http://stackoverflow.com/questions/31967527/table-performance-schema-session-variables-doesnt-exist

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s