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
Mysqldump is part of the relational database package for MySQL. It is used to back up all the data in a database into a single text file. These files or "dumps" can be generated for individual databases or a collection of them.
Enter mysql.exe -uroot -p , and MySQL will launch using the root user. MySQL will prompt you for your password. Enter the password from the user account you specified with the –u tag, and you'll connect to the MySQL server.
Put no-auto-rehash
option in the [mysql]
section, instead of [client]
[mysql]
no-auto-rehash
In this case mysqldump is functional.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With