Solution for "Table" is read only in MySQL

Source: Internet
Author: User
Tags drupal file permissions phpmyadmin

Prior to the Linux direct copy under the data of the entire database folder, in phpMyAdmin to re-give new users the appropriate permissions, Drupal successfully connected to the database. But there are more than N line error hints, all the cache-related tables are ' Read Only ', and phpmyadmin inside the optimization table is also the hint "table ' xxx ' is Read only".

I suspect file permissions, so the database folder below all the table files chmod into 777,chown into "_mysql", but this problem is more serious, drupal inside the real table crached. No way, immediately Google, found that in fact, it is very easy to solve.

First, find the location of mysqladmin, usually under Mysql/bin, and then run the command:

./mysqladmin-u Root-p Flush-tables

Then enter the root account password, right away, without any hint, re-open Drupal, everything is OK.

This time, we also found the correct permission settings for the database file: Data under Database folder 700, table file 660, all files should be owned by MySQL.

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.