mysql:`my.cnf` 中的未知变量
mysql: unknown variable in `my.cnf`
我按照these instructions加速加载一个大的本地文件(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
但遇到以下问题:
mysql: unknown variable 'innodb_doublewrite=0'
mysql: unknown variable 'innodb_support_xa=0'
PS: MySQL 版本
$ mysql --version
mysql Ver 14.14 Distrib 5.6.27, for debian-linux-gnu (x86_64) using EditLine wrapper
将它们放在 [mysqld]
下,而不是 [mysql]
。
此外,确保 innodb_buffer_pool_size
大约是可用 RAM 的 70%。
即便如此,您也可能会超时。
或者您可能需要将文件分块。 (每个块 10K 行可能是合理的。)
我按照these instructions加速加载一个大的本地文件(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
但遇到以下问题:
mysql: unknown variable 'innodb_doublewrite=0'
mysql: unknown variable 'innodb_support_xa=0'
PS: MySQL 版本
$ mysql --version
mysql Ver 14.14 Distrib 5.6.27, for debian-linux-gnu (x86_64) using EditLine wrapper
将它们放在 [mysqld]
下,而不是 [mysql]
。
此外,确保 innodb_buffer_pool_size
大约是可用 RAM 的 70%。
即便如此,您也可能会超时。
或者您可能需要将文件分块。 (每个块 10K 行可能是合理的。)