VPS侦探论坛

 找回密码
 注册
查看: 4247|回复: 6

Mysql突然启动失败。

[复制链接]
发表于 2015-7-2 09:18:21 | 显示全部楼层 |阅读模式

主机:bandwagonhost  512
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 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-7-2 09:35:37 | 显示全部楼层


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

而且数据库目录也不在/usr/local/mysql/data ,而在 /usr/local/mysql/var下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 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 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 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 试一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 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 [Note] Plugin 'FEDERATED' is disabled.
2015-07-02 14:34:09 2520 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-07-02 14:34:09 2520 [Note] InnoDB: The InnoDB memory heap is disabled
2015-07-02 14:34:09 2520 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-02 14:34:09 2520 [Note] InnoDB: Memory barrier is not used
2015-07-02 14:34:09 2520 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-07-02 14:34:09 2520 [Note] InnoDB: Using CPU crc32 instructions
2015-07-02 14:34:09 2520 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-07-02 14:34:09 2520 [Note] InnoDB: Completed initialization of buffer pool
2015-07-02 14:34:09 2520 [Note] InnoDB: Highest supported file format is Barracuda.
2015-07-02 14:34:09 2520 [Note] InnoDB: Log scan progressed past the checkpoint lsn 1626014
2015-07-02 14:34:09 2520 [Note] InnoDB: Database was not shutdown normally!
2015-07-02 14:34:09 2520 [Note] InnoDB: Starting crash recovery.
2015-07-02 14:34:09 2520 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-07-02 14:34:09 2520 [Note] InnoDB: Restoring possible half-written data pages
2015-07-02 14:34:09 2520 [Note] 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 [Warning] 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 [Note] 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 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-07-02 14:35:24 3044 [Note] InnoDB: The InnoDB memory heap is disabled
2015-07-02 14:35:24 3044 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-02 14:35:24 3044 [Note] InnoDB: Memory barrier is not used
2015-07-02 14:35:24 3044 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-07-02 14:35:24 3044 [Note] InnoDB: Using CPU crc32 instructions
2015-07-02 14:35:24 3044 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-07-02 14:35:24 3044 [Note] InnoDB: Completed initialization of buffer pool
2015-07-02 14:35:24 3044 [Note] 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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x

军哥运维代购:http://shop63846532.taobao.com/

发表于 2015-7-2 21:12:14 | 显示全部楼层

看日志是有非正常的关闭,然后mysql自己进行了恢复
然后就被killed了,没有具体信息
看看内存占用情况及磁盘使用情况
可能是内存使用过大被kill掉了
 楼主| 发表于 2015-7-3 00:05:37 | 显示全部楼层

回复 6# 的帖子


问题已经解决,MARK一下。

关了innodb就好了。。。其实一开始出现问题,到重装后出现的问题,都是innodb在作怪。
反正我innodb我用不上,还是关了算了,稳定了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 01:17 , Processed in 0.028496 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表