Greg
Greg

Reputation: 12837

mysql client setting no-auto-rehash conflicting with mysqldump

Our database has many tables with many columns. It takes a long time for the commandline mysql client to connect unless I pass it -A. I'd rather not have to put that in every time, so I tried adding the my.cnf option no-auto-rehash.

That works great until I have to use mysqldump:

mysqldump: unknown option '--no-auto-rehash'

Apparently mysqldump uses the options in my.cnf's [client] section, even if there is a separate [mysqldump] section. Is there any way to use no-auto-rehash and still have a functional mysqldump? Is there a [no-really-just-the-mysql-client] section?

Thanks.

The same question was asked on the mysql forums with no response:

http://forums.mysql.com/read.php?35,583759,583760

Upvotes: 6

Views: 7330

Answers (2)

QArea
QArea

Reputation: 4981

Put no-auto-rehash option in the [mysql] section, instead of [client]

[mysql]
no-auto-rehash

In this case mysqldump is functional.

Upvotes: 9

user3665831
user3665831

Reputation: 31

I do this all the time:

[client]
compress
user=uuuuuuu
password=ppppppppp

[mysql]
prompt=\h\_\d>\_
no-auto-rehash

[mysqldump]
quick
max_allowed_packet=1G

Upvotes: 3

Related Questions