转 mysql数据库非法关机铁血教训

(2011-09-15 04:56:03)

标签:

杂谈

概述:

昨早犯警硬件闭机,古早8:56去便收现crm体系挨没有开了,经过排查是mysql数据库起没有去了。直到9:34才弄好。尾要启事便识谈警闭机招致数据库表誉坏。而且我的数据库出有备份(内网测试中)。

经过:

1、访谥页,提示弊端,毗连没有到数据库,

2、启动mysql办事,卸载战启闭rpm安拆的mysql办事(来日诰日安拆postfix如同yum安拆了mysql),用netstat

-anp |grep mysqld 下令检察mysql办事出有起去,用mysql -uroot -p也毗连没有到办事器。

3、检察弊端提示:

17:02:23 [ERROR] Can't open the mysql.plugin table. Please run

mysql_upgrade to create it.

17:02:23 [ERROR] /usr/local/mysql/libexec/mysqld: Table

'./mysql/host' is marked as crashed and last (automatic?) repair

failed

17:02:23 [ERROR] Fatal error: Can't open and lock privilege

tables: Table './mysql/host' is marked as crashed and last

(automatic?) repair failed

17:02:23 mysqld_safe mysqld from pid file

/var/lib/mysql/localhost.localdomain.pid ended

17:24:31 mysqld_safe Starting mysqld daemon with databases from

/var/lib/mysql

17:24:31 [Warning] '--skip-locking' is deprecated and will be

removed in a future release. Please use '--skip-external-locking'

instead.

收现提示数据库表誉坏。(./mysql/host)

4、建复数据库表:

cd /var/lib/mysql/mysql

myisamchk -of host.MYI

- recovering (with keycache) MyISAM-table 'host.MYI'

Data records: 0

表host.MYI建复胜利。

5、再次启动办事,检察办事是没有是启动,登录mysql,借是没有成。所以再次检察弊端日记

/usr/local/mysql/libexec/mysqld: Table './mysql/plugin' is marked

as crashed and last (automatic?) repair failed

/usr/local/mysql/libexec/mysqld: Table 'plugin' is marked as

crashed and last (automatic?) repair failed

17:24:31 [ERROR] Can't open the

mysqlhttp://www.jsdonsem.com/.plugin table. Please run

mysql_upgrade to create it.

17:24:31 [ERROR] /usr/local/mysql/libexec/mysqld: Table

'./mysql/user' is marked as crashed and last (automatic?) repair

failed

17:24:31 [ERROR] Fatal error: Can't open and lock privilege

tables: Table './mysql/user' is marked as crashed and last

(automatic?poppin) repair failed

17:24:31 mysqld_safe mysqld from pid file

/var/lib/mysql/localhost.localdomain.pid ended

17:27:13 mysqld_safe Starting mysqld daemon with databases from

/var/lib/mysql

17:27:13 [Warning] '--skip-locking' is deprecated and will be

removed in a future release. Please use '--skip-external-locking'

instead.

6、又收现./mysql/user表誉坏本文章转载街梦网http://www.hiphopjw.com/。

[root@localhost mysql]# myisamchk -of user.MYI

- recovering (with keycache) MyISAM-table 'user.MYI'

Data records: 6

7、表建复胜利,但是借是启动没有了办事,继绝看弊端日记

/usr/local/mysql/libexec/mysqld: Table './mysql/plugin' is marked

as crashed and last (automatic?) repair failed

/usr/local/mysql/libexec/mysqld: Table 'plugin' is marked as

crashed and last (automatic?) repair failed

17:27:13 [ERROR] Can't open the mysql.plugin table. Please run

mysql_upgrade to create it.

17:27:13 [ERROR] /usr/local/mysql/libexec/mysqld: Table

'./mysql/db' is marked as crashed and last (automatic?) repair

failed

17:27:13 [ERROR] Fatal error: Can't open and lock privilege

tables: Table './mysql/db' is marked as crashed and last

(automatic?) repair failed

17:27:13 mysqld_safe mysqld from pid file

/var/lib/mysql/localhost.localdomain.pid ended

8、末了一个弊端,是./mysql/db表借出有建盖锩继绝建复./mysql/db表

9、[root@localhost mysql]# myisamchk -of db.MYI

- recovering (with keycache) MyISAM-table 'db.MYI'

Data records: 0

Data records: 2

10、末了启动mysql办事

/usr/local/mysql/bin/mysqld_safe &

11、检察办事是没有是正在匝弄

[root@localhost ~]# netstat -anp | grep mysqld

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 4360/mysqld

unix 2 [ ACC ] STREAM LISTENING 4360/mysqld /tmp/mysql.sock

当时分收现办手沃众弄。

12、登录mysql试试

[root@localhost ~]# mysql -uroot -p

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 35

Server version: 5.1.55-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All

rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free

software,

and you are welcome to modify and redistribute it under the GPL

v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current

input statement.

mysql>

能登录。

13、正在挨开网页,已能一样平常访谒。

分享:

喜欢

0

赠金笔

加载中,请稍候......

评论加载中,请稍候...

发评论

登录名: 密码: 找回密码 注册记住登录状态

昵   称:

评论并转载此博文

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

非法关机 mysql_转 mysql数据库非法关机铁血教训相关推荐

  1. 服务器系统不关机怎么备份,服务器数据库不关机备份

    服务器数据库不关机备份 内容精选 换一换 随着SAP系统业务数据量的持续增长,线下软件版本旧.性能差或友商云服务器规格小.架构不灵活等因素,导致SAP系统运行缓慢.维护成本高.越来越多的客户选择将SA ...

  2. 美团技术 mysql_美团MySQL数据库巡检系统的设计与应用

    巡检工作是保障系统平稳有效运行必不可少的一个环节,目的是能及时发现系统中存在的隐患.我们生活中也随处可见各种巡检,比如电力巡检.消防检查等,正是这些巡检工作,我们才能在稳定的环境下进行工作.生活.巡检 ...

  3. 关联查询mysql_《MySQL数据库》关联查询

    原标题:<MySQL数据库>关联查询 一.关联查询 1.概念 在查询数据时,所需要的数据不只在一张表中,可能在两张或多张表中.这个时候,需要同时操作这些表来查询数据,即关联查询. 关联查询 ...

  4. 移动 网络 连mysql_中国移动MySQL数据库优化最佳实践

    本文根据DBAplus社群第69期线上分享整理而成,文末还有书送哦~ 讲师介绍章颖 数据研发工程师 现任中国移动杭州研发中心数据研发工程师,擅长MySQL故障诊断,性能调优,MySQL高可用技术,曾任 ...

  5. 郑明秋什么版本的MySQL_《MySQL数据库实用教程》郑明秋,蒙连超,赵海侠著【摘要 书评 在线阅读】-苏宁易购图书...

    商品参数 作者: 郑明秋,蒙连超,赵海侠著 出版社:北京理工大学出版社 出版时间:2017-12-01 版次:1 页数:207 开本:16开 装帧:平装 ISBN:9787568250825 版权提供 ...

  6. 美团监控系统mysql_美团 MySQL 数据库巡检系统的设计与应用

    说明: 作者:王琦 来源:美团技术团队 最新互联网大厂面试真题.Java程序员面试策略(面试前的准备.面试中的技巧)请访问GitHub 我们生活中随处可见各种巡检系统,比如电力巡检.消防检查等,正是这 ...

  7. 英文首字母排序mysql_利用MySQL数据库来处理中英文取首字母排序

    [package com.syz;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import ja ...

  8. 服务器数据库异常MySQL_服务器 mysql数据库异常

    查看服务器的log日志的时候,发现服务器中经常报一些如下的错误: 2009-02-06 08:22:20,588 INFO [cn.legend.myznt.util.SystemExceptionH ...

  9. 查询最近一千条数据mysql_保留mysql数据库中的最新1000条记录

    mysql_connect("localhost","root","root"); mysql_select_db("test&q ...

最新文章

  1. 一文带你领略并发编程的内功心法
  2. Ping命令为什么要加上“-t”参数
  3. 【FJOI2015】最小覆盖双圆问题
  4. 一款基于 Spring Boot 开发 OA 开源产品
  5. outlook恢复已删除邮件
  6. 从无到有整合SpringMVC-MyBatis项目(3):整合SpringMVC+Mybatis
  7. 多因子量化投资模型策略深度研究
  8. mac系统 查找英文目录
  9. 仿支付宝输入密码效果
  10. python文件自动化处理 -- 读写文件
  11. 星座 member.php,php 通过生日获取对应的星座
  12. 椭圆机和跑步机哪个更好
  13. pinyin4J一款非常好用的汉字和拼音转换的插件
  14. linux-ramparse-v2 for qcom
  15. mysql my.cnf 内容_为何 my.cnf 内容是空的,数据库却可以运行
  16. Android 十六进制颜色值转换成int类型值
  17. 北京大学肖臻老师《区块链技术与应用》公开课笔记26——ETH智能合约篇2
  18. innerHTML VS createElement
  19. android播放mp3旋转动画,Android 实现旋转木马的音乐效果
  20. Android仿QQ界面,登录后使用Toast显示账号和密码

热门文章

  1. LabelStudio + MMDetection 实现目标分割预标注
  2. 即学即会 Serverless | 初识 Serverless 架构
  3. mysql root 登录权限管理_MySQL基础教程(7)MySQL用户与权限管理
  4. mysql词法分析antlr4_sharding-jdbc之ANTLR4 SQL解析
  5. RubikFX:用JavaFX 3D解决魔方难题
  6. Maven搭建多模块企业级项目+SSM框架搭建
  7. 年轻一代 winner 的程序人生,改变世界的起点藏在身边
  8. “乘风破浪”的中国SaaS :风浪越大,机会越大?
  9. 如何利用 Google 开源的 TFCO 构建机器学习模型?
  10. 阿里平头哥科学家亲述 RISC-V 2019 Summit 十大心得!