3

I get the following error when I try to use mysqlcheck, mysqlrepair or mysqlanalyze:

mysqlcheck: unknown variable 'max_allowed_packet=100M'

I am trying to find whether there are any corrupt tables or indexes.

Background:

  • MySQL Ver 14.14 Distrib 5.5.24, for Linux (x86_64) using readline 5.1
  • I used the command mysqlcheck -u xxxx -h xxx.xxx.xx.xx -d xxxx -p xxxxx

my.cnf

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
default-character-set = utf8
max_allowed_packet = 100M

Under [client]

2
  • [client] port = 3306 socket = /var/run/mysqld/mysqld.sock default-character-set = utf8 max_allowed_packet = 100M Under [cliebt] May 23, 2013 at 6:53
  • Remove max_allowed_packet = 100M from [client] Section and then execute mysqlcheck.Please have a look at bugs.mysql.com/bug.php?id=68313 May 23, 2013 at 7:00

2 Answers 2

2

According to this bug report (resolved as "not a bug"), you shouldn't put settings for mysqld in the [client] section of your .ini file.

Put the max_allowed_packet option in the [mysqld] section instead.

See Using Option Files for more details.

1
  • 1
    ...afaik it's a valid (and required for some purposes) setting for clients. I've got a database with an unreasonably large blob in it which clients can't retrieve unless both the client and server have the option. See it mentioned here: dev.mysql.com/doc/refman/5.5/en/packet-too-large.html
    – pacifist
    Oct 22, 2014 at 23:40
1

Add max_allowed_packet, open

my.ini/my.cnf under [mysqld] section.

Once the change is done you would have to restart the server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.