简体   繁体   English

MySQL表不存在,但确实存在

[英]MySQL Table does not exist, but it does

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. 我不熟悉构建数据库,已经为正在创建的网站创建了数据库,并且在尝试尝试时不断收到此消息“在服务器中执行SQL脚本错误:错误1146:表'mydb.franch'不存在”向前工程我的数据库。 The table does exist but it is not being read. 该表确实存在,但是没有被读取。 (See image below). (请参见下图)。 Please any help will be appreciated. 请任何帮助将不胜感激。

错误信息 表存在

I can't add a comment, but in your image the table is "Franch" not "franch". 我无法添加评论,但是在您的图像中,表格是“ Franch”而不是“ franch”。 Maybe that is the problem? 也许是问题所在?

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`

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 . 在这种情况下,由于该表称为mydb Franch you would do: select * from mydb . Franch你会做: select * from MYDB . Franch;` 弗朗西;`

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM