[Note] Specified key was too long; max key length is 767 bytes #MySql #MariaDB

Krishnendu Paul

May 5, 2021 1 min read


When tried to update ghost blog from 3.x to 4.x, faced error like following and ghost instance was unable to start

 Ghost was able to start, but errored during boot with: update `members_stripe_customers_subscriptions` set `stripe_price_id` = '' - ER_BAD_FIELD_ERROR: Unknown column 'stripe_price_id' in 'field list'

When tried to add manually, got following error

Specified key was too long; max key length is 767 bytes


After trying many fixes following worked

Add following lines in /etc/mysql/conf.d/custom.cnf on Debian 9

[mysqld]
    innodb_default_row_format = dynamic

Then restart mysql server. Then goto mysql root console and try following by changing the dbname

ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;


Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.