我已经阅读了很多关于这个问题的线程和MySQL文档,似乎没有任何建议。
这是my.cnf
[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking default-storage-engine=INNODB character-set-server=utf8 collation-server=utf8_bin interactive_timeout = 2880000 wait_timeout = 2880000 net_write_timeout = 6000 net_read_timeout = 6000 delayed_insert_timeout = 6000 key_buffer = 256M key-buffer-size = 32M max_allowed_packet = 600M thread_stack = 256K thread_cache_size = 8 max-connections = 500 thread-cache-size = 50 open-files-limit = 65535 table-definition-cache = 4096 table-open-cache = 10240 query-cache-type = 0 query_cache_limit = 2M query_cache_size = 32M myisam-recover = BACKUP innodb_buffer_pool_size = 384M innodb_additional_mem_pool_size = 20M innodb_log_file_size = 10M innodb_log_buffer_size = 64M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 180 log_error = /var/log/mysql/error.log expire_logs_days = 10 max_binlog_size = 100M [mysqldump] quick quote-names max_allowed_packet = 64M [isamchk] key_buffer = 32M
此外,我在MySQL CLI中运行查询以确保我的设置保持不变,它们似乎是:
mysql> select @@global.wait_timeout, @@session.wait_timeout; +-----------------------+------------------------+ | @@global.wait_timeout | @@session.wait_timeout | +-----------------------+------------------------+ | 2880000 | 2880000 | +-----------------------+------------------------+
mysql> select @@global.max_allowed_packet, @@session.max_allowed_packet; +-----------------------------+------------------------------+ | @@global.max_allowed_packet | @@session.max_allowed_packet | +-----------------------------+------------------------------+ | 629145600 | 629145600 | +-----------------------------+------------------------------+
服务器环境:Ubuntu Server 14.04LTS
MySQL版本:5.6
这是一个专用的MySQL服务器,它没有其他应用程序。
我的内存不足:
MemTotal: 32948824 kB MemFree: 31494136 kB Cached: 281624 kB SwapCached: 0 kB SwapTotal: 33550332 kB SwapFree: 33550332 kB
答案 0 :(得分:0)
我终于能够解决这个问题,但绕过MySQL Workbench Migration Tool并使用mysqldup生成用于恢复到服务器的数据库.sql文件。这就是我的所作所为:
这里有一个奇怪的事情:mysqlcheck和mysql_upgrade,当在数据库上运行时以某种方式超时,返回状态OK并且没有发现任何错误。我不知道为什么,但我认为这是一个非常奇怪和烦人的问题,考虑到它正是mysqlcheck的用途。
无论如何,如果您遇到此问题,请尝试从较旧的备份(如果有的话)还原数据库,看看是否有效。