Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2300698
  • 博文数量: 276
  • 博客积分: 5998
  • 博客等级: 大校
  • 技术积分: 5175
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 14:43
文章分类

全部博文(276)

文章存档

2014年(25)

2013年(11)

2012年(69)

2011年(167)

2010年(4)

分类: Mysql/postgreSQL

2011-11-10 15:56:21

使用的innodb,检查你的my.cnf或my.ini,里面会有一个参数innodb_force_recovery,

你看看他的值,默认是没有这个参数,没有的话,他的默认值是0,这个参数的值如果

大于0,innodb会被禁止使用insert、update、delete命令,你可以尝试将他的值设置

为0,看看你的mysql是否正常,如果正常就用就行了。

Warning

This variable should be set greater than 0 only in an emergency situation when you want to dump your tables from a corrupt database! As a safety measure, InnoDB prevents any changes to its data when this variable is greater than 0.

The database must not otherwise be used with any nonzero value of innodb_force_recovery. As a safety measure, InnoDB prevents users from performing INSERT, UPDATE, or DELETE operations when innodb_force_recovery is greater than 0.

You can SELECT from tables to dump them, or DROP or CREATE tables even if forced recovery is used. If you know that a given table is causing a crash on rollback, you can drop it. You can also use this to stop a runaway rollback caused by a failing mass import or ALTER TABLE. You can kill the mysqld process and set innodb_force_recovery to 3 to bring the database up without the rollback, then DROP the table that is causing the runaway rollback.


http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_force_recovery

http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

阅读(5417) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~