Mysql 'Got error -1 from storage engine' error

前端 未结 6 1518
暖寄归人
暖寄归人 2020-12-30 23:51

I have a myism table \'test\' which holds some out-dated data, now I want to recreate the table, all columns the same except that I changed the storage from myism to innodb.

6条回答
  •  梦谈多话
    2020-12-31 00:13

    CREATE TABLE IF NOT EXISTS banners ( id int(255) NOT NULL AUTO_INCREMENT, user int(255) NOT NULL DEFAULT '0', KEY type (type) )
    engine=myisam DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    this code change to

    CREATE TABLE IF NOT EXISTS banners ( id int(255) NOT NULL AUTO_INCREMENT, user int(255) NOT NULL DEFAULT '0', KEY type (type) )
    engine=INNODB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

提交回复
热议问题