我有一个使用debian(7.2)和mysql(5.6.28-1debian7)的旧测试服务器。很长一段时间没碰它了,mysql还在工作,不过今天我想用这个命令:
mysql> grant all on dbname.* to 'user'@'localhost' identified by 'password';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database:***NONE***
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
它以前工作过,这里没有升级。
在日志中,我可以看到一条很长的错误消息:
14:02:21 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68108 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x37af1a0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f7b99eb6e40 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x8c1cae]
/usr/sbin/mysqld(handle_fatal_signal+0x471)[0x699801]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f7baecd9030]
/usr/sbin/mysqld(_Z9get_fieldP11st_mem_rootP5Field+0x52)[0x77ab82]
/usr/sbin/mysqld[0x6bc24d]
/usr/sbin/mysqld(_Z11mysql_grantP3THDPKcR4ListI11st_lex_userEmbb+0x4f7)[0x6be1c7]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x337f)[0x7090cf]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x368)[0x70a838]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xd43)[0x70b613]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x13f)[0x6e03cf]
/usr/sbin/mysqld(handle_one_connection+0x47)[0x6e0477]
/usr/sbin/mysqld(pfs_spawn_thread+0x143)[0x8fba43]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50)[0x7f7baecd0b50]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f7bad614e6d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (387af60): grant all on test_gyujto.* to 'gyujto'@'localhost' identified by 'gyujto_pw'
Connection ID (thread ID): 1
Status: NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
181129 15:02:21 mysqld_safe Number of processes running now: 0
181129 15:02:21 mysqld_safe mysqld restarted
2018-11-29 15:02:21 0 [Note] /usr/sbin/mysqld (mysqld 5.6.28) starting as process 4885 ...
2018-11-29 15:02:21 4885 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
2018-11-29 15:02:21 4885 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)
2018-11-29 15:02:21 4885 [Note] Plugin 'FEDERATED' is disabled.
2018-11-29 15:02:21 4885 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-29 15:02:21 4885 [Note] InnoDB: The InnoDB memory heap is disabled
2018-11-29 15:02:21 4885 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-29 15:02:21 4885 [Note] InnoDB: Memory barrier is not used
2018-11-29 15:02:21 4885 [Note] InnoDB: Compressed tables use zlib 1.2.7
2018-11-29 15:02:21 4885 [Note] InnoDB: Using Linux native AIO
2018-11-29 15:02:21 4885 [Note] InnoDB: Not using CPU crc32 instructions
2018-11-29 15:02:21 4885 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-11-29 15:02:21 4885 [Note] InnoDB: Completed initialization of buffer pool
2018-11-29 15:02:21 4885 [Note] InnoDB: Highest supported file format is Barracuda.
2018-11-29 15:02:21 4885 [Note] InnoDB: The log sequence numbers 265095338 and 265095338 in ibdata files do not match the log sequence number 265095378 in the ib_logfiles!
2018-11-29 15:02:21 4885 [Note] InnoDB: Database was not shutdown normally!
2018-11-29 15:02:21 4885 [Note] InnoDB: Starting crash recovery.
2018-11-29 15:02:21 4885 [Note] InnoDB: Reading tablespace information from the .ibd files...
2018-11-29 15:02:21 4885 [Note] InnoDB: Restoring possible half-written data pages
2018-11-29 15:02:21 4885 [Note] InnoDB: from the doublewrite buffer...
2018-11-29 15:02:21 4885 [Note] InnoDB: 128 rollback segment(s) are active.
2018-11-29 15:02:21 4885 [Note] InnoDB: Waiting for purge to start
2018-11-29 15:02:21 4885 [Note] InnoDB: 5.6.28 started; log sequence number 265095378
2018-11-29 15:02:21 4885 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2018-11-29 15:02:21 4885 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2018-11-29 15:02:21 4885 [Note] Server socket created on IP: '127.0.0.1'.
2018-11-29 15:02:21 4885 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MySQL 50546, now running 50628. Please use mysql_upgrade to fix this error.
2018-11-29 15:02:21 4885 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MySQL 50546, now running 50628. Please use mysql_upgrade to fix this error.
2018-11-29 15:02:21 4885 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MySQL 50546, now running 50628. Please use mysql_upgrade to fix this error.
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Incorrect definition of table performance_schema.events_waits_summary_by_thread_by_event_name: expected column 'THREAD_ID' at position 0 to have type bigint(20), found type int(11).
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Column count of mysql.file_summary_by_event_name is wrong. Expected 23, found 5. Created with MySQL 50546, now running 50628. Please use mysql_upgrade to fix this error.
2018-11-29 15:02:21 4885 [ERROR] Column count of mysql.file_summary_by_instance is wrong. Expected 25, found 6. Created with MySQL 50546, now running 50628. Please use mysql_upgrade to fix this error.
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Incorrect definition of table performance_schema.mutex_instances: expected column 'LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Incorrect definition of table performance_schema.rwlock_instances: expected column 'WRITE_LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MySQL 50546, now running 50628. Please use mysql_upgrade to fix this error.
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
2018-11-29 15:02:21 4885 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
2018-11-29 15:02:21 4885 [Note] Event Scheduler: Loaded 0 events
2018-11-29 15:02:21 4885 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.28' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)
. 有人知道为什么会出现这个问题,以及如何解决它吗?错误消息说要升级它,但我想避免使用此解决方案。重新启动当然发生了,但没有任何改变。
1条答案
按热度按时间kpbwa7wx1#
我不知道是怎么回事,但同样的情况发生在不同的服务器上。在django应用程序上运行python manage.py测试后,这两个服务器都损坏了。
但这解决了问题:
.