Error 1036 Hy000 At Line 1 Table Is Read Only
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more how to change read only table in mysql about Stack Overflow the company Business Learn more about hiring developers or posting
Mysql Table Is Read Only Repair
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack table is read only phpmyadmin Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Table is 'read only' up vote 12 down vote favorite When mysql table is read only windows I want to execute an update query on my table I got an error saying: 1036 - Table data is read only. How can I fix that? Table attributes in /var/db/mysql are set to 777. 'Repair Table' function doesnt seems to help. Is there anything I can do with that? mysql freebsd sql-update share|improve this question asked Mar 5 '12 at 23:50 Cyclone 3,667175193 add a comment| 4 Answers
Mysql Workbench Table Read Only
4 active oldest votes up vote 19 down vote accepted who owns /var/db/mysql and what group are they in, should be mysql:mysql. you'll also need to restart mysql for changes to take affect also check that the currently logged in user had GRANT access to update share|improve this answer answered Mar 5 '12 at 23:55 ncremins 7,26521423 add a comment| up vote 3 down vote You should change owner to MYSQL:MYSQL. Use this command: chown -Rf mysql:mysql /var/lib/mysql/DBNAME share|improve this answer edited May 6 '14 at 14:12 Tim Visée 1,18421439 answered Oct 14 '12 at 10:41 kamranonline 90111 Thanks, using the -Rf argument worked for me! –Tim Visée May 6 '14 at 14:10 add a comment| up vote 0 down vote MySQL doesn't have write access to the database file. Check the permissions and the owner of the file. share|improve this answer answered Mar 5 '12 at 23:54 Borodin 99k74197 if you change the permissions manually don't forget to issue a FLUSH PRIVILEGES command. –Jody Mar 5 '12 at 23:57 add a comment| up vote -2 down vote One other way to receive this error is to create your table with a "Like" statement and use as source a merge
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of #1036 - table 'wp_users' is read only this site About Us Learn more about Stack Overflow the company Business Learn 1036 table user is read only more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
(errno: 165 Is
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/9575914/table-is-read-only MySQL error 1036: table is read only up vote 4 down vote favorite When im trying to insert a record to the table using phpmyadmin it gives me #1036 - Table 'sch_portfolio' is read only I saw in some articles they said that this could happen if the owner of this table is somthing other than mysql. so i set the owner as http://stackoverflow.com/questions/17629407/mysql-error-1036-table-is-read-only mysql and restart the server. Still im getting the same error. any help would be really appreciated. Thanks in advance drwxrwxrwx 2 mysql mysql 4096 Jul 13 15:27 schooltap mysql phpmyadmin share|improve this question asked Jul 13 '13 at 10:42 Dilantha 97611523 One assumes that the mysqld process is running under the mysql user. Does that user have access to enter every directory along the filepath? Has the MySQL user as which you are connecting to mysqld been granted permission to write to the table? –eggyal Jul 13 '13 at 10:46 Does this happen to only one table/database or to all? Maybe the MySQL server is in read-only mode, which is frequently the case for replication slaves - check dev.mysql.com/doc/refman/5.5/en/…. –Shi Jul 13 '13 at 11:57 add a comment| 3 Answers 3 active oldest votes up vote 9 down vote accepted One needs super user privs to do this, most commonly sudo is used to acheve this. in order too Change the owner of the files. sudo chown -R mysql:mysql /var/lib/mysql Reboot Mysql for the changes sudo service mysql restart who owns sch_portfolio
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official https://ubuntuforums.org/showthread.php?t=638999 Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum http://grokbase.com/t/mysql/mysql/05cyp0nbm2/some-myisam-tables-turned-read-only-mysql-max-4-1-12 Community Ubuntu Specialised Support Development & Programming Programming Talk Mysql tables are read only?? Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place read only to report it, thanks ! Results 1 to 6 of 6 Thread: Mysql tables are read only?? Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode December 13th, 2007 #1 sdowney717 View Profile View Forum Posts Private Message Ubuntu addict and loving it Join Date Dec 2006 BeansHidden! Mysql tables are read only?? Here is what happens, I log is read only into mysql, try to update a table and it is read only. Infact all DB's and all tables are read only. Any ideas? scott@scott-desktop:~$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 32 Server version: 5.0.45-Debian_1ubuntu3-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use books5 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> update usertable set myuser='help'; ERROR 1036 (HY000): Table 'usertable' is read only mysql> GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'New'; Query OK, 0 rows affected (0.09 sec) mysql> update usertable set myuser='help'; ERROR 1036 (HY000): Table 'usertable' is read only mysql> Adv Reply December 13th, 2007 #2 sdowney717 View Profile View Forum Posts Private Message Ubuntu addict and loving it Join Date Dec 2006 BeansHidden! Re: Mysql tables are read only?? figured it out sort of. The database folder has to be owned by MySql Server and not root etc.... I discovered this by importing into a new database a sql backup Now updates work etc.... But how would you change the owners
a larger database, with many myisam tables.A couple days ago, some of them turned 'read only'.Symptom:delete from day_48392 where id=28398776259;ERROR 1036 (HY000): Table 'day_48392' is read onlyI checked:- table file permissions are right ('660 mysql:daemon').They are the same for all tables- directory permissions are 700 mysql:daemon- tables are not packed.To track this down, I tried:- copy data from old table to a new table:create table x like day_48392;insert into x select * day_48392;table 'x' is now writable and "works fine"drop table day_48392;alter table x rename day_48392;and 'day_49392' is once again read only :-(- compress/uncompress the table: no luck- repair the table from within mysql fails (read only)- repair table from shell with myisamchk works, butdoesn't fix the problem- I flushed tables (several times)- I restarted mysql- I rebooted the systemSo what else ???Hint:before this started, I backed up a number of older tables.In order to back them up, I copied them to a differentpartition, marked them '444'. Next, I dropped the tables, and added asymlink to the backups.Looks like tables are affected if they existed at the time of thebackup. Tables created after that are fine. The tables that have theproblem where not touched during the backup :-(The tables are part of a merge table. but dropping the merge tabledoesn't help. reply Tweet Search Discussions Search All Groups mysql 1 response Oldest Nested Johannes B. Ullrich Well, I found the reason for these table becoming 'read only': These tables where part of a merge table, which included some read only tables (read only set in file system). Now even after the merge table was dropped, all member tables stayed 'read only' regardless of their individual file system permissions. very odd.. a bug? to recover, you will have to: - drop the merge table. - create new tables - insert the data from the old tables into the new tables - drop the old table