这是我6个月前安装的数据库,运行良好。这目前正在Ubuntu12.04中运行。试图连接到MySQL会导致以下错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
然后有:
$ sudo mysqld返回:
130702 15:38:54 [Note] Plugin 'FEDERATED' is disabled.
130702 15:38:54 InnoDB: The InnoDB memory heap is disabled
130702 15:38:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130702 15:38:54 InnoDB: Compressed tables use zlib 1.2.3.4
130702 15:38:54 InnoDB: Initializing buffer pool, size = 128.0M
130702 15:38:54 InnoDB: Completed initialization of buffer pool
130702 15:38:54 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130702 15:38:54 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130702 15:38:55 InnoDB: Waiting for the background threads to start
130702 15:38:56 InnoDB: 1.1.8 started; log sequence number 5201901917
130702 15:38:56 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
130702 15:38:56 [Note] - '127.0.0.1' resolves to '127.0.0.1';
130702 15:38:56 [Note] Server socket created on IP: '127.0.0.1'.
130702 15:38:56 [Note] Event Scheduler: Loaded 0 events
130702 15:38:56 [Note] mysqld: ready for connections.
Version: '5.5.28-0ubuntu0.12.04.3' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
19:39:02 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=16777216
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 = 346681 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f9509e51530
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 = 7f94f1d3de60 thread_stack 0x30000
mysqld(my_print_stacktrace+0x29)[0x7f95083427b9]
mysqld(handle_fatal_signal+0x483)[0x7f9508209b43]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f9506f5bcb0]
mysqld(+0x320e1c)[0x7f9508113e1c]
mysqld(_ZN4JOIN15alloc_func_listEv+0x9c)[0x7f950812391c]
mysqld(_ZN4JOIN7prepareEPPP4ItemP10TABLE_LISTjS1_jP8st_orderS7_S1_S7_P13st_select_lexP18st_select_lex_unit+0x918)[0x7f9508124658]
mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x130)[0x7f950812d060]
mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x17c)[0x7f9508132fbc]
mysqld(+0x2f6714)[0x7f95080e9714]
mysqld(_Z21mysql_execute_commandP3THD+0x16d8)[0x7f95080f1178]
mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x10f)[0x7f95080f5e0f]
mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1380)[0x7f95080f7260]
mysqld(_Z24do_handle_one_connectionP3THD+0x1bd)[0x7f950819b80d]
mysqld(handle_one_connection+0x50)[0x7f950819b870]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7f9506f53e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f9506684cbd]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f94e0004b80): is an invalid pointer
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.我不知所措。在诊断这一问题时,还有哪些报告是有用的?/var/log/mysql.err和/var/log/mysql.log是空的。
发布于 2013-07-02 21:18:52
看来你已经被一个持续存在的臭虫伤害了。
由于一些未知的原因,mysql.sock文件往往在没有警告的情况下消失:
我曾多次处理过这种情况,以下是我过去的帖子:
Dec 14, 2012:Percona-服务器超时/etc/init.d/mysql启动May 08, 2012:如何正确停止Mac上的MySQL服务器?Feb 06, 2012:MySQL数据库与表丢失方法是使用TCP/IP协议登录mysql。只要你有:
root@127.0.0.1用户--protocol=tcp选项skip-networking您可以像这样登录到mysql:
mysql -uroot -h127.0.0.1 --protocol=tcp -p如果您可以这样做,那么关闭mysql并启动它将修复如下:
mysqladmin -uroot -h127.0.0.1 --protocol=tcp -p shutdown
service mysql start这将使文件mysql.sock返回。这就解释了为什么重启操作系统也解决了这个问题。
回到问题上,你打字了
sudo mysqldMySQL已经在运行,您试图再次启动mysqld,这就是奇怪的消息。
https://serverfault.com/questions/520315
复制相似问题