I have had apache, php, and mysql server 5.5 installed locally and happily running for a while now, able to query the databases and everything. Today, I copy and pasted sample databases into the Mysql\Data folder from a SQL Query course book: SQL Queries for Mere Mortals, by John Viescas.
THE PROBLEM
When I try to query the databases I get an error telling me the database table(s) do not exist, when they actually do exist.
Error Code: 1146. Table ‘bowlingleagueexample.bowler_scores’ doesn’t exist
What I have Tried
Based on my research, it probably has something to do with permissions?
I’m not a database guy, but am trying to learn. I have viewed the databases with MySQL Workbench, and PHPMyAdmin. Workbench shows me the tables, but errors out on the query execution. PhpMyAdmin won’t even show me the tables.
You usually can’t hot-swap database tables. You need to use the proper
mysqldumpand restore procedure. You can seriously trash your MySQL installation if you make a habit of doing this, especially with InnoDB tables.PhpMyAdmin has a load and save snapshot feature that helps with this sort of thing. Give it a valid
.sqlfile and you should be fine.