Linux under MySQL appears #1036–table "is a read only error resolution

Source: Internet
Author: User
Tags vps

These two days in the website move, this site moved using the form of direct packaging MySQL database and Web files to migrate, upload good MySQL data directory inside the database to MySQL storage database on the VPS, unzip on the line. The path to my VPS storage database is/usr/local/mysql/var.

Upload good site data, decompression, configuration of database link parameters on the line, the site can be connected to the normal, I thought this is a smooth migration completed, but later operation, found that only read the contents of the database, can not be changed to write any information, prompted #1036–table ' * ' is read only (* number is any table), which means that the table has only read-only properties.

Through SSH, to the database file 777 permissions, admin is my database folder


1,chmod-r 0777/usr/local/mysql/var/admin/

Change the owning user and group of the database directory to MySQL

2.

Chown-r Mysql:mysql Admin

But this can not change the database, first, find mysqladmin location, usually under Mysql/bin, my in/usr/local/mysql/bin, but also need to run the following command:


3./mysqladmin-u root-p flush-tables

After entering the root account password, immediately, without any hint, and then test, can read and write, move will be completed smoothly.

Ext.: http://zhaoxiaoru39.blog.163.com/blog/static/609552192012511104730115/

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.