+1 vote
in I only have text by (4.6k points)
edited by
Recently I'm learning the Head First SQL, then I encountered a probolem. When i tried to import the .sql file of the book to my localhost phpMyAdmin for the following use, it gave error msg:

#1146 - Table 'xxx' doesn't exist.

And i have tried several .sql files, all the same.

2 Answers

0 votes
by (21.2k points)
 
Best answer

To solve this problem, please do as follows:

  1. download MySQL-Front and install (it will automatically associate the .sql files)
  2. connect to a localhost database in MySQL-Front first
  3. double click the .sql file you want to import into the localhost phpMyAdmin
  4. in MySQL-Front, just click "Run" (or press F9) to execute the sql script
  5. All done. Go back to phpMyAdmin again, you will see what you want.
0 votes
by (21.2k points)
BTW, another choice I know is that you can delete the database which you want to import your .sql file into. Then create a new database and import the .sql file again.
Welcome to Best solution for PC & Software errors, where you can ask questions and receive answers from other members of the community.
...