无法连接到本地MySQL服务器,丢失连接,服务器已经消失

时间:2014-09-10 16:55:27

标签: mysql centos

我的服务器有一个非常奇怪的问题。

首先,服务器崩溃了。 我使用CPanel和WHM。由于我无法访问,我使用SSH重启服务器。它起作用了,恢复正常。

但很快就开始成为一个新问题: "无法通过socket' /var/lib/mysql/mysql.sock'连接到本地MySQL服务器; (2)" " MySQL服务器已经消失了#34; "在读取初始通信数据包时失去与MySQL服务器的连接,系统错误:104" "在读取授权数据包时失去与MySQL服务器的连接,系统错误:104"

但是这些错误并不总是如此,因此网站在线并正常工作,只是在某个时间出现此问题,或者在CPanel和mysqltuner中也会显示此错误。

我做的第一件事:搜索。

我更改了my.cnf(添加了袜子),未解决。 我重新启动了服务器,没有解决。 我带着一个旧的my.cnf(有备份)回来了,没有解决。 我试着改变“localhost'至' 127.0.0.1'但是创建了一个新问题"无法连接到' 127.0.0.1'上的MySQL服务器。"

我尝试了所有可以找到的东西。 没有解决。

此外," mysqld"总是重新启动! 之前,该过程花费了数小时/天/周而没有重新启动。在"顶部"命令显示mysqld超过50小时,时间超过100小时+"。但现在,不超过10分钟。换句话说,该过程正在重新启动!

在" -m free",我有服务器1303免费,"顶部"使用处理器是4.5%" CPU(#);#34;。

另一个神秘的事情是" cron jobs"那些不起作用。 我有TRUNCATE和INSERT数据的cron作业。 TRUNCATE工作,INSERT / SELECT不工作。

需要一些帮助才能解决问题。 '(

我只有这台服务器,使用Centos系统。

编辑:

140910 12:32:01  InnoDB: error: space object of table 'w_w/SRands',
InnoDB: space id 274796 did not exist in memory. Retrying an open.
InnoDB: Error: tried to read 16384 bytes at offset 0 0.
InnoDB: Was only able to read 0.
140910 12:32:01  InnoDB: Operating system error number 0 in a file operation.
InnoDB: Error number 0 means 'Success'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
140910 12:32:01 mysqld_safe Number of processes running now: 0
140910 12:32:01 mysqld_safe mysqld restarted
140910 12:32:02 [Warning] Using unique option prefix join_buffer instead of join_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140910 12:32:02 [Note] Plugin 'FEDERATED' is disabled.
140910 12:32:02 InnoDB: The InnoDB memory heap is disabled
140910 12:32:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140910 12:32:02 InnoDB: Compressed tables use zlib 1.2.3
140910 12:32:02 InnoDB: Using Linux native AIO
140910 12:32:02 InnoDB: Initializing buffer pool, size = 119.0M
140910 12:32:02 InnoDB: Completed initialization of buffer pool
140910 12:32:02 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 395690234452
140910 12:32:02  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Error: the size of single-table tablespace file ./w_w/SRands.ibd
InnoDB: is only 0 0, should be at least 65536!InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 395690846835
140910 12:32:02  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 5$
InnoDB: Apply batch completed
140910 12:32:03  InnoDB: Error: table 'w_w/SRands'
InnoDB: in InnoDB data dictionary has tablespace id 274796,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting-datadict.html
InnoDB: for how to resolve the issue.
140910 12:32:03  InnoDB: Waiting for the background threads to start
140910 12:32:04 InnoDB: 5.5.37 started; log sequence number 395690846835
140910 12:32:04 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140910 12:32:04 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140910 12:32:04 [Note] Server socket created on IP: '0.0.0.0'.
140910 12:32:04 [Note] Event Scheduler: Loaded 1 event
140910 12:32:04 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.37-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

0 个答案:

没有答案