Re: migration of mysql to new server: wired errors

From: J.O. Aho <user_at_example.net>
Date: Wed, 31 Jan 2018 07:13:50 +0100
Message-ID: <fdd54vFi84nU1_at_mid.individual.net>


On 01/30/18 22:55, Julianony M wrote:
> I have recently migrated several databases from MySQL-5.0.95 on a RedHat-6 server to MySQL-5.6.39 on a RedHat-7 server, along with their perl applications.
>
> While everything works just fine on the old server, it encounters problems on the new server when I perform the same database load:
>
> ERROR 1071 (42000) at line 383:
> Specified key was too long; max key length is 767 bytes
>
> although the same data, same scripts works just fine on the old server.
>
> Could anyone suggest possible causes or spots to look at for a fix? A simple comparisons of /etc/my.ini from the two servers didn't give me much clue.

If you know what action in the third party application will generate the error, then enable logging

SET global log_output = 'FILE';
SET global general_log_file='/safe/path/to/store/mysql_query.log'; SET global general_log = 1;

run the action and disable logging

SET global general_log = 0;

Now you should have your query which causes the problem and you can figure out what's on line 383 is a key (if I remember it right it can also be just an index, specially multi column index can become too long).

If you use MyISAM, then you could set a KEY_BLOCK_SIZE for the table.

-- 

 //Aho
Received on Wed Jan 31 2018 - 07:13:50 CET

Original text of this message