通过quick参数加快mysql命令行下导出数据

来源:互联网 发布:电脑网络参数怎么修改 编辑:程序博客网 时间:2024/05/17 19:19

mysql command line option quick

mysql -utest -p****** -htest.db.com -P33060 test --quick -Bse "SELECT CONNECTION_ID();"

结果:

Default options are read from the following files in the given order:/etc/my.cnf ~/.my.cnfThe following groups are read: mysql clientThe following options may be given as the first argument:--print-defaults    Print the program argument list and exit--no-defaults       Don't read default options from any options file--defaults-file=#   Only read default options from the given file #--defaults-extra-file=# Read this file after the global files are readVariables (--variable-name=value)and boolean options {FALSE|TRUE}  Value (after reading options)--------------------------------- -----------------------------auto-rehash                       TRUEcharacter-sets-dir                (No default value)default-character-set             latin1comments                          FALSEcompress                          FALSEdatabase                          (No default value)delimiter                         ;vertical                          FALSEforce                             FALSEnamed-commands                    FALSElocal-infile                      FALSEno-beep                           FALSEhost                              g1-off-ku-real.dns.ganji.comhtml                              FALSExml                               FALSEline-numbers                      TRUEunbuffered                        FALSEcolumn-names                      TRUEsigint-ignore                     FALSEport                              3320prompt                            mysql>quick                             FALSE......

也就是说,需要配置支持,才可以导出数据,那么可以根据个人情况在home目录进行配置,当然最后用全局配置,这样可以保持环境的一致性。为了测试下面就是在home目录配置的

~/.my.cnf

[client]quick

再次执行

mysql -utest -p****** -htest.db.com -P33060 test --quick -Bse "SELECT CONNECTION_ID();"

结果:

4547014 # your connection id.

需要注意的就是

--quick beofore -Bse
0 0
原创粉丝点击