InnoDB 表存在于 MySQL 中,但在将数据库复制到新服务器后表示它们不存在
我使用 mysqldump 导出数据库,然后将其导入到另一台服务器上的 MySQL 中。现在,如果我执行“显示表格”,我可以看到所有表格,但我实际上无法选择或描述其中任何表格。
错误 1146 (42S02):表“mydatabase.user”不存在
我的所有表都是 InnoDB。我看到人们在使用 old_passwords 时遇到一个问题,所以我在 my.cnf 中明确将其设置为 0,并确保 mysql 表中的所有密码都是 41 个十六进制数字,因为它们应该是新密码。
I used mysqldump to export my database and then I imported it into MySQL on my other server. I can now see all my tables if I do "show tables" but I can't actually select from or describe any of them.
ERROR 1146 (42S02): Table 'mydatabase.user' doesn't exist
All of my tables are InnoDB. I saw one issue people had where they were using old_passwords, so I explicitly set that to 0 in my.cnf and I made sure all of the passwords in the mysql table were 41 hexadecimal digits as they should be for the new passwords.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
原因“显示表格;”起作用是因为 mysqld 将仅扫描数据库目录中的 .frm 文件。只要它们存在,它就会看到表定义。
如果您将数据导入 MySQL 并出现此错误消息,我会立即执行以下命令:(顺便说一句,这是 MySQL 5.1.45,但无论如何都可以在 MySQL 5.x 中运行)
如果您导入数据的服务器into 说 InnoDB 被禁用,那么你就有大问题了。您应该执行以下操作:
1) 从新导入数据库服务器中删除所有数据
2) 清理 InnoDB 设置
3) 运行 SHOW ENGINES;并确保 InnoDB 完全正常运行!
4) 将 mysqldump 重新加载到新的导入服务器中
尝试一下!
The reason "show tables;" works is because mysqld will scan the database directory for .frm files only. As long as they exist, it sees a table definition.
If you imported the data into MySQL and this error message happens, the first thing I would immediately do is run this command: (BTW This is MySQL 5.1.45, but works in MySQL 5.x anyway)
If the server you imported the data into says InnoDB is disabled, then you have a big problem. Here is what you should do:
1) Drop all the Data from the New Import DB Server
2) Cleanup InnoDB Setup
3) run SHOW ENGINES; and make sure InnoDB is fully operational !!!
4) Reload the mysqldump into the new import server
Give it a Try !!!
当我从Windows服务器更改为Linux服务器时,我遇到了这个问题。
表是文件,windows文件不区分大小写,但linux文件区分大小写。
在我的应用程序中,在sql查询中,有时我使用大写表名,有时使用小写,所以,有时我得到了与你相同的结果。
I had this problem when I changed from a windows server to a Linux server.
Tables are files, and windows files are case insesitive, but linux files are case sensitive.
In my aplication, in the sql queries, some times I used uppercase tablenames and other times lowercase, so, sometimes I obtained the same result as you.
我的情况是 SQLCA.DBParm 参数。
我使用了 SQLCA.DBParm = "Databse = "sle_database.text"" 但它必须
解释:您将组合三个字符串:
I my case it was
SQLCA.DBParm
parameter.I used
SQLCA.DBParm = "Databse = "sle_database.text""
but it must beExplain : you are going to combine three strings :