【发布时间】:2017-08-28 09:42:04
【问题描述】:
我有一个来自正在运行的服务器的 mysqldump
mysql Ver 14.14 Distrib 5.6.35, for Linux (x86_64) using EditLine wrappercentos 6
我正在尝试将其导入到运行 mariadb mysql Ver 15.1 Distrib 10.1.22-MariaDB, for Linux (x86_64) using readline 5.1 的服务器
那是运行 Centos7
我经常收到这样的语法错误ERROR 1064 (42000) at line 4908: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '),('5051888098585',2512,131872,359,'Pending','completed','0','1','2016-03-15 17' at line 1
行号出现随机,如果我删除表并再次开始恢复,它可能会在该行之前或之后的某个点再次失败。有时它几乎可以走到最后。一个认为不变的是该行始终是一个大的插入查询。
这里的类似问题并不能解决我的问题。 我已经完全重建了服务器,更改了多个 mysqldump 设置和 my.cnf 设置,没有任何变化。
当前的 my.cnf
[mysqld]
bind-address = ::
skip_name_resolve
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
max_allowed_packet = 1G
max_connections = 600
thread_cache_size = 16
query_cache_size = 64M
tmp_table_size= 512M
max_heap_table_size= 512M
wait_timeout=60
#Innodb Settings
innodb_file_per_table=1
innodb_buffer_pool_size = 25G
innodb_log_file_size = 2048M
innodb_flush_log_at_trx_commit = 0
innodb_file_format = Barracuda
innodb_flush_neighbors = 0
#Log
log-error =/var/log/error.log
tmpdir = /dev/shm
我已经尝试了几十种不同的导入设置和转储设置,但没有任何效果。这些是最新的: 对于转储
mysqldump -u admin -p`cat /etc/psa/.psa.shadow` --master-data=2 db_name --default-character-set=utf8 -c -Q --result-file=dump.sql
用于导入
mysql -uadmin -p`cat /etc/psa/.psa.shadow` db_name < dump.sql
【问题讨论】:
-
多少内存?..
-
@RickJames 32G.