对MySQL数据库中Table is read only的歼灭

数据库 MySQL
以下的文章主要是对MySQL数据库中Table is read only的解决方案的描述,如果你在实际操作中经常遇到这样的情况的话,你就可通过以下的文章对其有一个正确的解决。

在实际操作中你是否遇到过这样的提示,repair数据表中出现“MySQL数据库中Table is read only”的字样,那么对其到底如何解决呢?以下的文章就是针对MySQL数据库中出现Table is read only的解决方案的描述。

在MySQL中,Select之类的都正常,但在网页程序中提示:Table '********' is read only

SQL代码

  1. chmod -R 0777 /var/lib/MySQL/taoniu2007/  

给数据库目录的所属用户和组改为MySQL,并加上777的权限,还是一样提示。

程序中使用root连接,也是一样的提示。

想用myisamchk来检查一下,也提示read only。

最终在这里找到了解决方法:http://www.MySQLtalk.org/re-the-table-is-read-only-vt154092.html

引用一下

SQL代码

  1. Hi,   
  2. I just encountered a similar problem on one of my production servers   
  3. this morning. (I'm still investigating the cause.) After doing a   
  4. quick bit of Google-searching, this solved my problem:   
  5. MySQLadmin -u <username> -p flush-tables   
  6. By the way: All directories in /var/lib/MySQL should have 700   
  7. permissions (owned my the MySQL user) and everything within those   
  8. directories should be 660 (owned by the MySQL user and MySQL group).   
  9. (This was on a FreeBSD 4.8 server running MySQL Server 3.23.58)   
  10. Hope this helps,   
  11. Seth   

运行flush-tables后,read only问题解决

MySQL数据库中Table is read only的解决

以上的相关内容就是对MySQL数据库中Table is read only的解决的介绍,望你能有所收获。

【编辑推荐】

  1. MySQL导出 XLS 数据库工具的实际操作
  2. 对MySQL行锁的深入研究
  3. MySQL游标的使用笔记大全
  4. 对MySQL 存储过程中乱码的破解
  5. MySQL备份之根据表备份概述
责任编辑:佚名 来源: cnblogs
相关推荐

2010-05-11 17:56:59

MySQL Table

2010-05-24 09:44:30

MySQL数据库

2011-08-15 11:12:37

SQL Server Read-Only错误

2011-07-11 14:36:10

BinlogMysql

2017-10-23 16:06:41

数据库MySQL复制中断

2010-05-31 17:15:39

MySQL数据库

2010-05-20 09:01:22

MySQL数据库

2010-05-26 11:21:00

MySQL数据库操作

2010-06-10 14:03:00

MySQL EMS

2010-06-10 14:03:00

MySQL EMS

2011-03-28 13:25:27

MySQL数据库哈希加密

2009-02-02 16:50:34

数据库表的锁定MySQL

2010-05-26 10:41:30

2010-05-20 14:25:25

2011-08-10 15:38:12

ConstraintOracle

2010-05-04 11:02:44

Oracle数据库

2010-06-01 11:28:43

MySQL数据库

2018-07-30 15:00:05

数据库MySQLJOIN

2023-05-29 15:23:37

MySQL数据库函数

2011-04-07 09:06:27

MySQL数据库密码
点赞
收藏

51CTO技术栈公众号