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)
Go to the database in phpadmin and in sql drop the table .Then create the table.
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!
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.
What worked for me was:
.frm
file. The files .MYD
and .MYI
are missing for empty tables. .frm
file.The old version of xampp created tables in MyISAM format the new version as InnoDB!
I had the same problem. My solution: Change table name in the create table query, exequte it and then rename the table.
Then, you can also drop this table and after it create it without getting error.
Hmm, are you sure you have a database and are priviledged to do CREATE statements.
If you have phpmyadmin:
To test the first possibiblity, create a new (empty) test database, click it in the menu and then press the SQL button in the top navigation and copy paste your statement again. If this doesn't work try the second.
For the second you can click on the 'home' button and then go to 'Privileges'. If there are only two or three accounts, but all with root privileges, you have the privileges to do a CREATE. Otherwise you can check your account and give yourself the privileges.
If both possibilities didn't work-out I don't know either. It worked fine for me :(