[英]MySQL > Table doesn't exist. But it does .. after database is restored from backup
At beginning we had application running perfectly on centos 6 , Since some updates were needed on the server, We had to re-install softwares and packages on the server and use the application files from last backup we had. 开始时,我们的应用程序在centos 6上运行良好,由于服务器上需要一些更新,因此我们必须在服务器上重新安装软件和软件包,并使用上次备份中的应用程序文件。
Having trouble to access tables: If I run SHOW TABLES ;
无法访问表:如果我运行
SHOW TABLES ;
all tables are shown but if I try to query any of them eg: SELECT * FROM Users;
显示所有表格,但如果我尝试查询其中的任何表格,例如:
SELECT * FROM Users;
I get this error ERROR 1146 (42S02): Table 'myDatabaseName.Users' doesn't exist
我收到此错误
ERROR 1146 (42S02): Table 'myDatabaseName.Users' doesn't exist
I also checked this answer which suggests to have ib* files in the root of the MySQL datadir (eg ibdata1, ib_logfile0 ib_logfile1) , in my case it seems to be in the right place and changing permission on mydatabase folder chmod -R 660 myDatabaseName
and I did that 我还检查了这个答案 ,它建议在MySQL datadir的根目录中有ib *文件(例如ibdata1,ib_logfile0 ib_logfile1),在我看来,它位于正确的位置,并且更改了mydatabase文件夹
chmod -R 660 myDatabaseName
和我做到了
In my MySQL datadir I have the followings: myDatabaseName, ibdata1 , ib_logfile0, ib_logfile1 , mysql , mysql.sock , performance_schema
在我的MySQL数据目录中,我具有以下内容:
myDatabaseName, ibdata1 , ib_logfile0, ib_logfile1 , mysql , mysql.sock , performance_schema
Looking forward to hearing from you. 期待您的回音。 Thanks
谢谢
最后,通过卸载并重新安装mysqlServer并从备份中将整个mysql目录/var/lib/mysql
内容移到新目录中,解决了问题,并且我可以访问所有表和数据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.