Table doesn't exist after CREATE TABLE

前端 未结 6 606
栀梦
栀梦 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:06

    I had the same issue: #1146 - Table 'tutsplus_ci.posts' doesn't exist. I solved this issue following these steps:

    I made an export of the incriminated table in a sql file. I noticed that the table name in the .sql file has a suplemental trailing space. I switch back to phpmyadmin in Operations section of my table and I rename the table from ' posts' to 'posts'. After taken all these actions the error didn't show up.

    To conclude, indeed the table 'posts' didn't exist as error message said. Because the the actual name of the table was ' posts' not 'posts'. The space before the name is hard to be notice in phpmyadmin. This is the story. Nothing special. I hope it helps!

提交回复
热议问题