Table doesn't exist after CREATE TABLE

前端 未结 6 608
栀梦
栀梦 2021-01-17 08:21

I\'m trying to import this sql in my database name symfony

CREATE TABLE IF NOT EXISTS ingredient (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255)          


        
6条回答
  •  我在风中等你
    2021-01-17 09:08

    I had this same problem. I got a "server went away" message when creating the table and after that I was getting table doesn't exist messages, but I couldn't try to re-create the table because then I got a message saying that it did exist. I solved it by executing this at the command line:

    mysqlcheck --repair --all-databases -u root -p
    

    It also wouldn't hurt to restart the mysql server after this as well just in case.

提交回复
热议问题