0

When I try to restore the sql file with mysqldump, I get "ERROR 1874 (HY000) at line 42: InnoDB is in read only mode." I get the error.

"SET GLOBAL read_only = OFF; "

I tried this and it didn't change, so I changed my.conf but I still get the same error.

Can you tell me how to restore with mysqldump?

backup.sql

DROP TABLE IF EXISTS `mylife_2010`;
  40 /*!40101 SET @saved_cs_client     = @@character_set_client */;
  41 /*!40101 SET character_set_client = utf8 */;
  42 CREATE TABLE `mylife_2010` (
  43   `number` int(20) NOT NULL AUTO_INCREMENT,
  44   `user_no` int(20) DEFAULT NULL,
  45   `datestr` int(8) DEFAULT NULL,
  46   `time` int(2) DEFAULT NULL,
  47   PRIMARY KEY (`number`)
  48 ) ENGINE=InnoDB AUTO_INCREMENT=516 DEFAULT CHARSET=utf8mb4;

my.cnf

innodb_read_only = off

and

SET GLOBAL read_only = OFF;

But I still get the same error

박승제
  • 1
  • 1
  • You might as well publish lines 1-39 as well. and please add mysqldump command you used and a note of where you ran this from (command line, mysqlworkbench...) – P.Salmon Mar 13 '23 at 10:39
  • Did you restart after changing my.cnf? Is that setting in the `[mysqld]` section? The `SET GLOBAL` needs to be in the same connection. – Rick James Mar 28 '23 at 19:43

0 Answers0