鍍金池/ 問答/數(shù)據(jù)庫/ 為何出現(xiàn)表格不存在的提示?

為何出現(xiàn)表格不存在的提示?

請下載數(shù)據(jù),解壓后,復(fù)制到mysql的data文件夾里面。

https://pan.baidu.com/s/1GWKE...

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| guestbook          |
| lyb                |
| mysql              |
| performance_schema |
+--------------------+
5 rows in set (0.06 sec)

我發(fā)現(xiàn)guestbook的數(shù)據(jù)可以使用。

mysql> use lyb;
Database changed
mysql> show tables;
+---------------+
| Tables_in_lyb |
+---------------+
| admin         |
| author        |
| cart          |
| city          |
| link          |
| lyb           |
| lyb1          |
| messages      |
| news          |
| province      |
| route         |
| shop          |
+---------------+
12 rows in set (0.00 sec)

mysql> select * from admin;
ERROR 1146 (42S02): Table 'lyb.admin' doesn't exist
mysql> select class from lyb;
ERROR 1146 (42S02): Table 'lyb.lyb' doesn't exist
mysql>

明明存在表格,為何會這樣?

回答
編輯回答
久不遇

請問樓主是怎么創(chuàng)建的這些表?如果是復(fù)制的數(shù)據(jù)文件的話,參考一下下面這個鏈接

https://blog.csdn.net/e_wsq/article/details/63704574

2018年7月25日 07:26