[英]mysql: unknown variable in `my.cnf`
I follow these instructions to speed up loading a big local file ( 500+M
, 10+M
rows) into MySQL, adding configurations to /etc/mysql/my.cnf
: 我按照这些说明加速将一个大的本地文件( 500+M
, 10+M
行)加载到MySQL中,将配置添加到/etc/mysql/my.cnf
:
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
local-infile=1
# add following code
innodb_doublewrite = 0
innodb_support_xa = 0
but encounter following issues: 但遇到以下问题:
mysql: unknown variable 'innodb_doublewrite=0'
mysql: unknown variable 'innodb_support_xa=0'
PS: MySQL version PS:MySQL版本
$ mysql --version
mysql Ver 14.14 Distrib 5.6.27, for debian-linux-gnu (x86_64) using EditLine wrapper
Put them under [mysqld]
, not [mysql]
. 把它们放在[mysqld]
,而不是[mysql]
。
Also, make sure that innodb_buffer_pool_size
is about 70% of available RAM. 另外,请确保innodb_buffer_pool_size
大约是可用RAM的70%。
Even then, you may hit some timeout. 即使这样,你也可能会超时。
Or you may need to chunk the file up. 或者您可能需要将文件分块。 (10K rows per chunk might be reasonable.) (每个块10K行可能是合理的。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.