MySQL表不存在,但它确实存在

时间:2022-09-25 23:25:18

I am new to building databases, i have created a database for a website i am creating, and i keep getting this message "Executing SQL script in server ERROR: Error 1146: Table 'mydb.franch' doesn't exist", when trying to forward engineer my database. The table does exist but it is not being read. (See image below). Please any help will be appreciated.

我是新建数据库,我为我正在创建的网站创建了一个数据库,我不断收到此消息“在服务器错误中执行SQL脚本:错误1146:表'mydb.franch'不存在”,当尝试时转发我的数据库。该表确实存在但未被读取。 (见下图)。请任何帮助将不胜感激。

MySQL表不存在,但它确实存在 MySQL表不存在,但它确实存在

3 个解决方案

#1


0  

I can't add a comment, but in your image the table is "Franch" not "franch". Maybe that is the problem?

我无法添加评论,但在您的图像中,表格是“Franch”而不是“franch”。也许这就是问题?

#2


0  

I may be wrong but I believe you are trying to access your table as (something like)

我可能错了,但我相信你正试图访问你的桌子(类似的东西)

select * from 'mydb.franch'

or

要么

select * from `mydb.franch`

In either case it's wrong and should be

无论哪种情况都是错误的应该是

select * from `mydb`.`franch`

#3


0  

MYSQL is case sensitive when creating a table, which means that you cannot create a table or variable with lower/upper case, and call it with upper/lower cases.

创建表时,MYSQL区分大小写,这意味着您无法使用大写/小写创建表或变量,并使用大写/小写来调用它。

As such you must call the same name you used to create the table. In this case since the table is called mydb.Franch you would do: select * frommydb.Franch;`

因此,您必须使用与创建表格相同的名称。在这种情况下,由于该表名为mydb.Franch,您可以这样做:select * frommydb.Franch;`

#1


0  

I can't add a comment, but in your image the table is "Franch" not "franch". Maybe that is the problem?

我无法添加评论,但在您的图像中,表格是“Franch”而不是“franch”。也许这就是问题?

#2


0  

I may be wrong but I believe you are trying to access your table as (something like)

我可能错了,但我相信你正试图访问你的桌子(类似的东西)

select * from 'mydb.franch'

or

要么

select * from `mydb.franch`

In either case it's wrong and should be

无论哪种情况都是错误的应该是

select * from `mydb`.`franch`

#3


0  

MYSQL is case sensitive when creating a table, which means that you cannot create a table or variable with lower/upper case, and call it with upper/lower cases.

创建表时,MYSQL区分大小写,这意味着您无法使用大写/小写创建表或变量,并使用大写/小写来调用它。

As such you must call the same name you used to create the table. In this case since the table is called mydb.Franch you would do: select * frommydb.Franch;`

因此,您必须使用与创建表格相同的名称。在这种情况下,由于该表名为mydb.Franch,您可以这样做:select * frommydb.Franch;`