Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 468823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:43:14+00:00 2026-05-12T23:43:14+00:00

Edit: This may be a 5.0-specific bug. (I’m on 5.0.83). Removing the innodb_log_file_size setting

  • 0

Edit: This may be a 5.0-specific bug. (I’m on 5.0.83). Removing the innodb_log_file_size setting gets rid of the problem. Which makes complete sense. Not.

Googling about finds a handful of similar, but not identical problems in 5.0 that were patched later.

With the “wrong” settings in my.cnf, this create statement on MySQL 5.0 will give me the “Specified key was too long; max key length is 1000 bytes”.

CREATE TABLE ReproduceTheProblem (
COLUMN_ONE varchar(200) character set utf8 default NULL,
COLUMN_TWO varchar(200) character set utf8 default NULL,  
KEY ThisKeyBreaks(COLUMN_ONE, COLUMN_TWO)  
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

In trying to improve performance, I arrived at my.cnf settings that perform well but get the “key was too long” error. I do have my.cnf settings that can create this key, but that perform terribly on importing data into a different, very large table.

The settings that work but perform badly (and which have some whacky values from my attempting to dial different settings in):

[client]
port        = 3306
socket      = /tmp/mysql.sock

[mysqld]
port        = 3306
socket      = /tmp/mysql.sock
skip-locking
key_buffer_size = 384M
max_allowed_packet = 1024M 
table_cache = 256
max_sp_recursion_depth=255
sort_buffer_size = 2M 
read_buffer_size = 2M 
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 30G
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
max_heap_table_size = 9900000
skip-federated
log-bin=mysql-bin
server-id   = 1

[mysqldump]
quick
max_allowed_packet = 256M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

The settings that perform well, but give me the key length error:

[client]
port            = 3306
socket          = /tmp/mysql.sock

[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
max_allowed_packet = 200M
table_cache = 256
query_cache_type = 1
query_cache_limit = 20M
query_cache_size = 500M
long_query_time = 2
thread_cache_size = 1000
thread_concurrency = 4
innodb_thread_concurrency = 4 
old_passwords = 1
max_connections = 1000
max_sp_recursion_depth = 255
server-id       = 0
innodb_buffer_pool_size = 800M
innodb_additional_mem_pool_size = 50M
innodb_log_file_size=50M
innodb_log_buffer_size = 200M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout =50

[mysqldump]
quick
max_allowed_packet = 200M

[mysql]
no-auto-rehash
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:43:14+00:00Added an answer on May 12, 2026 at 11:43 pm

    I don’t think your my.cnf has much to do with this, there must be some other variable.

    From the Restrictions on InnoDB Tables:

    The internal maximum key length is
    3500 bytes, but MySQL itself restricts
    this to 3072 bytes. (1024 bytes for
    non-64-bit builds before MySQL 5.0.17,
    and for all builds before 5.0.15.)

    I also note bug 4541 indicates a limit of 1000 bytes, and that there’s no plans to simply increase this.

    On the performance front, big indexes (and tables) like this will be really really slow. I’d suggest indexing only the prefix of the varchars rather than the whole string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 236k
  • Answers 236k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer With UI Spy open From the View menu Click Configure… May 13, 2026 at 6:28 am
  • Editorial Team
    Editorial Team added an answer Looking for rsync (for example over ssh)? May 13, 2026 at 6:28 am
  • Editorial Team
    Editorial Team added an answer Extract Method. May 13, 2026 at 6:28 am

Related Questions

Edit: This may be a 5.0-specific bug. (I'm on 5.0.83). Removing the innodb_log_file_size setting
I am running a little program in python that launches a small window that
We have a database with a very simple schema: CREATE TABLE IF NOT EXISTS
Here's the problem I'm having, I've got a set of logs that can grow
This is similar to a previous question , but the answers there don't satisfy

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.