MySQL Table is read only solution

Source: Internet
Author: User

The following article mainly introduces the specific solution of MySQL Table is read only. We encountered such a prompt a few days ago, that is, when the repair data Table is running, "MySQL Table is read only" appears. in MySQL, Select and other operations are normal, but the webpage program prompts: table '********' is read only.

SQL code

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

Change the user and group of the database directory to MySQL, and add the 777 permission.

The same is prompted when the root connection is used in the program.

If you want to use myisamchk to check it, the read only message is also displayed.

Finally, the solution is found here.

Reference

SQL code

 
 
  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  

The above content is an introduction to the MySQL Table is read only solution. I hope you will have some gains.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.