mySQL停止运行了?不能重启。错误:“无法通过套接字连接到本地MySQL服务器'/var/lib/mysql/mysql.sock'”

时间:2014-01-08 19:32:30

标签: mysql sockets innodb

我的客户端有一台运行稳定2年的服务器。他昨天打电话给b.c他注意到服务器已关闭(实际上它已经停机了几天)。我想弄清楚最近发生了什么。我似乎无法启动mysql。

当我跑:/etc/init.d/mysqld start时,它失败了。并且运行mysql会导致

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

我尝试调整/etc/my.cnf中的设置以将套接字更改为tmp目录,但这也不起作用。我认为还有其他事情要发生。也许是记忆问题?或者是腐败的东西?

下面是我的mysqld.log文件。

140108 05:14:51  mysqld started
InnoDB: Log scan progressed past the checkpoint lsn 362 2789208032
140108  5:14:51  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...
InnoDB: Doing recovery: scanned up to log sequence number 362 2789874367
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1637 row operations to undo
InnoDB: Trx id counter is 0 138804224
140108  5:14:51  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Error: tried to read 344064 bytes at offset 6 41517056.
InnoDB: Was only able to read 339968.
140108  5:15:08  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.0/en/operating-system-error-codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
140108 05:15:08  mysqld ended

我的/ var / lib / mysql目录看起来像这样

total 27654604
drwxr-xr-x  8 mysql mysql        4096 Jan  8 05:14 .
drwxr-xr-x 28 root  root         4096 May 29  2012 ..
drwxr-xr-x  2 mysql mysql       24576 Apr  5  2013 db_stackme
drwxr-xr-x  2 mysql mysql        4096 May 30  2012 db_stackmeuser
-rwxr-xr-x  1 mysql mysql 28280094720 Dec 20 09:54 ibdata1
-rwxr-xr-x  1 mysql mysql     5242880 Jan  8 05:14 ib_logfile0
-rwxr-xr-x  1 mysql mysql     5242880 Dec 20 09:51 ib_logfile1
drwxr-xr-x  2 mysql mysql        4096 May 30  2012 mysql
drwxr-xr-x  2 mysql mysql        8192 May 30  2012 openx
drwxr-xr-x  2 mysql mysql        4096 Jun  1  2012 stackme_business
drwxr-xr-x  2 mysql mysql        4096 May 30  2012 test

我非常感谢有关如何解决此问题的一些意见。

0 个答案:

没有答案