VPS侦探论坛

 找回密码
 注册
查看: 6114|回复: 13

安装后mysql启动失败

[复制链接]
发表于 2015-7-3 14:12:20 | 显示全部楼层 |阅读模式

lnmpa安装后  mysql启动提示 MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]
不知道是什么原因。 求大神帮忙解答下。万分感谢!




[ 本帖最后由 wanchuan666 于 2015-7-4 19:22 编辑 ]

本帖子中包含更多资源

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

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-7-3 17:02:26 | 显示全部楼层


rm -f /var/lock/subsys/mysql
后重启试试,还是不行就需要按反馈必须提供mysql日志信息
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-7-4 16:14:12 | 显示全部楼层

提示信息


rm -f /var/lock/subsys/mysql
后重启 依然提示Starting MySQL.The server quit without updating PID file (/mnt/mysql/VM_45_67_centos.pid).                                                 [FAILED]


mysql 日志文件在哪目录? 没有找到啊
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-7-4 21:08:44 | 显示全部楼层



置顶帖有说明
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-7-4 21:31:24 | 显示全部楼层

我也是这样

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

 楼主| 发表于 2015-7-5 16:03:24 | 显示全部楼层

军哥啥意思?  我的错误是啥错误啊? 没解决啊
 楼主| 发表于 2015-7-5 16:04:55 | 显示全部楼层

150703 14:00:37 [Note] Starting crash recovery...
150703 14:00:37 [Note] Crash recovery finished.
150703 14:00:37 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150703 14:00:37 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150703 14:00:37 [Note] Server socket created on IP: '0.0.0.0'.
150703 14:00:37 [ERROR] /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:00:37 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:00:37 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended
150703 14:08:42 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
150703 14:08:42 InnoDB: The InnoDB memory heap is disabled
150703 14:08:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150703 14:08:42 InnoDB: Compressed tables use zlib 1.2.3
150703 14:08:42 InnoDB: Initializing buffer pool, size = 16.0M
150703 14:08:42 InnoDB: Completed initialization of buffer pool
150703 14:08:42 InnoDB: highest supported file format is Barracuda.
150703 14:08:42  InnoDB: Waiting for the background threads to start
150703 14:08:43 InnoDB: 5.5.42 started; log sequence number 1626024
150703 14:08:43 [Note] Recovering after a crash using mysql-bin
150703 14:08:43 [Note] Starting crash recovery...
150703 14:08:43 [Note] Crash recovery finished.
150703 14:08:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150703 14:08:43 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150703 14:08:43 [Note] Server socket created on IP: '0.0.0.0'.
150703 14:08:43 [ERROR] /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:08:43 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:08:43 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2015-7-5 16:05:37 | 显示全部楼层

这个是   VM_45_67_centos.pid 提示的内容。  里面有error错误,但不明白啥意思。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-7-5 20:23:50 | 显示全部楼层

回复 2# 的帖子



操作后重启lnmp,貌似mysql就启动正常了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-7-5 20:30:15 | 显示全部楼层



chown mysql:mysql /usr/local/mysql/var
/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql 看一下这个报错不
后再重启mysql看看
 楼主| 发表于 2015-7-5 21:19:04 | 显示全部楼层

提示错误

[root@VM_45_67_centos ~]# /usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql
Installing MySQL system tables...
150705 21:18:38 [ERROR] /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/tables_priv.frm'
ERROR: 1033  Incorrect information in file: './mysql/tables_priv.frm'
150705 21:18:38 [ERROR] Aborting

150705 21:18:38 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/usr/local/mysql/var for more information.

You can try to start the mysqld daemon with:

    shell> /usr/local/mysql/bin/mysqld --skip-grant &

and use the command line tool /usr/local/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/local/mysql/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /usr/local/mysql/var that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before submitting a bug report
at http://bugs.mysql.com/

[root@VM_45_67_centos ~]#
 楼主| 发表于 2015-7-5 21:28:58 | 显示全部楼层

重启服务器 启动mysql 提示
150703 14:08:43 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended
150705 21:24:26 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
150705 21:24:26 InnoDB: The InnoDB memory heap is disabled
150705 21:24:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150705 21:24:26 InnoDB: Compressed tables use zlib 1.2.3
150705 21:24:26 InnoDB: Initializing buffer pool, size = 16.0M
150705 21:24:26 InnoDB: Completed initialization of buffer pool
150705 21:24:26 InnoDB: highest supported file format is Barracuda.
150705 21:24:27  InnoDB: Waiting for the background threads to start
150705 21:24:28 InnoDB: 5.5.42 started; log sequence number 1626024
150705 21:24:28 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150705 21:24:28 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150705 21:24:28 [Note] Server socket created on IP: '0.0.0.0'.
150705 21:24:28 [ERROR] /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/proxies_priv.frm'
150705 21:24:28 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/proxies_priv.frm'
150705 21:24:28 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-7-5 22:15:28 | 显示全部楼层
是否已经 chown mysql:mysql /usr/local/mysql/var ?

可以尝试使用/usr/local/mysql/bin/myisamchk -r /usr/local/mysql/var/mysql/tables_priv.frm 进行修复试试
或/usr/local/mysql/bin/mysql_upgrade -u root -p
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2015-7-5 22:53:01 | 显示全部楼层
我重装的 1.1版本 竟然行了,可能 1.2版本还不稳定的原因吧

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

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-24 23:02 , Processed in 0.031629 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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