hiblog 发表于 2015-7-2 09:18:21

Mysql突然启动失败。

主机:bandwagonhost512
lnmp版本:1.2
系统:ubuntu 14.04 x86_x64 mini
php版本:5.5.25
mysql版本:5.5.42
nginx版本:1.9.2

用了2天好好的突然就无法连接数据库,然后我就去查了问题。
我现在无法提供xxx.err了,因为我删除了所有的mysql。不过45.err的关于error的内容我还记得。

提示:Starting MySQL.The server quit without updating PID file (/usr/local/mysql/var/45.pid).

搜索了论坛和lnmp.org的所有资料均无法解决。

删除了my.cnf也不行。
最后查看了45.err发现有2处提示错误:can't mysql.plugin和mysql.host。貌似是数据表丢失还是连接不上。由于是新手,我真的无法解决。

我备份了/usr/local/mysql/data里的数据库,然后想重装mysql,搜了整个百度也没有找到重装lnmp mysql的信息。

各位大侠能帮忙吗?我真的不想重装整个lnmp。很累的

[ 本帖最后由 hiblog 于 2015-7-2 09:25 编辑 ]

licess 发表于 2015-7-2 09:35:37

按置顶帖反馈必读提供mysql日志信息

而且数据库目录也不在/usr/local/mysql/data ,而在 /usr/local/mysql/var下

hiblog 发表于 2015-7-2 09:39:25

回复 2# 的帖子

45.err已经被我rm-r了。但是我记得是丢失mysql.plugin和mysql.host这两个东西。
我现在只想知道,怎么重装lnmp 的mysql。

cd /root/
cd lnmp1.2-full/src/mysql-5.5.42后
应该怎么做。

[ 本帖最后由 hiblog 于 2015-7-2 09:44 编辑 ]

licess 发表于 2015-7-2 12:53:36

回复 3# 的帖子

/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql 试一下

hiblog 发表于 2015-7-2 14:38:16

重装lnmp后还是一样。我现在把45.err给载出来了。你刚刚给我的命令也执行了,然后重启lnmp,也不行
root@45:/usr/local/mysql/var# vim 45.err

150702 14:34:08 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
2015-07-02 14:34:09 2520 Plugin 'FEDERATED' is disabled.
2015-07-02 14:34:09 2520 InnoDB: Using atomics to ref count buffer pool pages
2015-07-02 14:34:09 2520 InnoDB: The InnoDB memory heap is disabled
2015-07-02 14:34:09 2520 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-02 14:34:09 2520 InnoDB: Memory barrier is not used
2015-07-02 14:34:09 2520 InnoDB: Compressed tables use zlib 1.2.8
2015-07-02 14:34:09 2520 InnoDB: Using CPU crc32 instructions
2015-07-02 14:34:09 2520 InnoDB: Initializing buffer pool, size = 16.0M
2015-07-02 14:34:09 2520 InnoDB: Completed initialization of buffer pool
2015-07-02 14:34:09 2520 InnoDB: Highest supported file format is Barracuda.
2015-07-02 14:34:09 2520 InnoDB: Log scan progressed past the checkpoint lsn 1626014
2015-07-02 14:34:09 2520 InnoDB: Database was not shutdown normally!
2015-07-02 14:34:09 2520 InnoDB: Starting crash recovery.
2015-07-02 14:34:09 2520 InnoDB: Reading tablespace information from the .ibd files...
2015-07-02 14:34:09 2520 InnoDB: Restoring possible half-written data pages
2015-07-02 14:34:09 2520 InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1626024
Killed
150702 14:34:09 mysqld_safe mysqld from pid file /usr/local/mysql/var/45.pid ended
150702 14:35:23 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
2015-07-02 14:35:24 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-07-02 14:35:24 3044 Plugin 'FEDERATED' is disabled.
2015-07-02 14:35:24 7f103d49a780 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-07-02 14:35:24 3044 InnoDB: Using atomics to ref count buffer pool pages
2015-07-02 14:35:24 3044 InnoDB: The InnoDB memory heap is disabled
2015-07-02 14:35:24 3044 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-02 14:35:24 3044 InnoDB: Memory barrier is not used
2015-07-02 14:35:24 3044 InnoDB: Compressed tables use zlib 1.2.8
2015-07-02 14:35:24 3044 InnoDB: Using CPU crc32 instructions
2015-07-02 14:35:24 3044 InnoDB: Initializing buffer pool, size = 16.0M
2015-07-02 14:35:24 3044 InnoDB: Completed initialization of buffer pool
2015-07-02 14:35:24 3044 InnoDB: Highest supported file format is Barracuda.
Killed
150704 14:35:24 mysqld_safe mysqld from pid file /usr/local/mysql/var/45.pid ended

licess 发表于 2015-7-2 21:12:14

看日志是有非正常的关闭,然后mysql自己进行了恢复
然后就被killed了,没有具体信息
看看内存占用情况及磁盘使用情况
可能是内存使用过大被kill掉了

hiblog 发表于 2015-7-3 00:05:37

回复 6# 的帖子

问题已经解决,MARK一下。

关了innodb就好了。。。其实一开始出现问题,到重装后出现的问题,都是innodb在作怪。
反正我innodb我用不上,还是关了算了,稳定了
页: [1]
查看完整版本: Mysql突然启动失败。