[英]Xampp-mysql - "Table doesn't exist in engine" #1932
Xampp error after moving xampp folder:移动 xampp 文件夹后出现 Xampp 错误:
Apache is running fine: Apache 运行良好:
as given below image i'm sucess to run apache but unable to run mysql if in case i moved and run xampp both apache and mysql but its shows error which is fresh and it show the error like "Table doesn't exist in engine" #1932 as given up image.如下图所示,我成功运行了 apache 但无法运行 mysql 如果我移动并运行 xampp apache 和 mysql 但它显示的错误是新鲜的并且它显示错误如“表在引擎中不存在” #1932 作为放弃图像。 please solve the issue anyone help pls
请解决这个问题有人帮助请
I have faced same issue and sorted using below step.我遇到了同样的问题并使用以下步骤进行排序。
C:\xampp\mysql\bin\my.ini
)C:\xampp\mysql\bin\my.ini
)innodb_data_file_path = ibdata1:10M:autoextend
innodb_data_file_path = ibdata1:10M:autoextend
ibdata1
file exist under C:/xampp/mysql/data/
C:/xampp/mysql/data/
下是否存在ibdata1
文件ibdata1
file from location C:\xampp\mysql\backup\ibdata1
C:\xampp\mysql\backup\ibdata1
复制ibdata1
文件hope it helps to someone.希望它对某人有所帮助。
将ib_logfileXX和ibdata文件从旧的 mysql/data 文件夹复制到新的 mysql 数据文件夹,它将解决问题
If you have copied & Pasted files from an old backup folder to new then its simple.如果您已将文件从旧备份文件夹复制并粘贴到新文件夹,那么它很简单。 Just copy the old
ibdata1
into your new one.只需将旧的
ibdata1
复制到新的 ibdata1 中即可。 You can find it from \xampp\mysql\data
And restart your mysql.你可以从
\xampp\mysql\data
找到它并重启你的mysql。
ibdata1
fileibdata1
文件This occurred to me when I take all files from the backups folder.当我从备份文件夹中取出所有文件时,这发生在我身上。 There is a folder you should not copy with other folders and files, called
ibdata1
.有一个文件夹不应与其他文件夹和文件一起复制,称为
ibdata1
。
I have faced same issue but copying the xampp\mysql\data\ibdata1
was not solved my problem, because I install new version of xampp, if you upgrading your xampp first make backup from all htdocs
and mysql
folder, in my case I just backup the all xampp to the new folder like old-xampp
then install new xampp and then you need do the following steps before starting your new xampp servers:我也遇到过同样的问题,但是复制
xampp\mysql\data\ibdata1
并没有解决我的问题,因为我安装了新版本的 xampp,如果您首先升级 xampp,请从所有htdocs
和mysql
文件夹中进行备份,在我的情况下,我只是备份将所有 xampp 复制到新文件夹(如old-xampp
,然后安装新的 xampp,然后您需要在启动新的 xampp 服务器之前执行以下步骤:
phpmyadmin
folder and ibdata1
from your new installation form this location xampp\mysql\data
.xampp\mysql\data
的新安装中备份phpmyadmin
文件夹和ibdata1
。old-xampp\mysql\data
and copy the ibdata1
file and phpmyadmin
from old location.old-xampp\mysql\data
并从旧位置复制ibdata1
文件和phpmyadmin
。xampp\mysql\data
and past them there.xampp\mysql\data
并将它们过去。ok step one you can copy from your old xampp xampp\mysql\data\ibdata1 and step two paste to your xampp new xampp\mysql\data\ibdata1 , and than open your xampp controller and stop mysql and start again.好的,第一步,您可以从旧的 xampp xampp\mysql\data\ibdata1 复制,然后第二步粘贴到您的 xampp new xampp\mysql\data\ibdata1 ,然后打开您的xampp控制器并停止mysql并重新开始。
i tried this and is work for me我试过了,对我有用
I had previously moved my mysql directory and forgot to change ALL references to the old location in \mysql\bin\my.ini.我之前移动了我的 mysql 目录并忘记更改对 \mysql\bin\my.ini 中旧位置的所有引用。
change these three lines:更改这三行:
datadir = "/programs/xampp/mysql/data"
innodb_data_home_dir = "/programs/xampp/mysql/data"
innodb_log_group_home_dir = "/programs/xampp/mysql/data"
Change "/programs/xampp/mysql/data" to new location this one was commented but I changed it anyways将“/programs/xampp/mysql/data”更改为新位置,此位置已被评论,但我还是更改了它
#innodb_log_arch_dir = "/programs/xampp/mysql/data"
You could:你可以:
After solving the problems, get output power from the database
解决问题后,从数据库中获取输出功率
backups
folder into data
folder.backups
文件夹的内容复制到data
文件夹中。 This worked for me.I also had same issue on my mac.我的mac上也有同样的问题。 I was running 5.3.0 version.
我正在运行 5.3.0 版本。 I removed that version and installed 7.2.1 version.
我删除了该版本并安装了 7.2.1 版本。 After this it is working in my case.
在此之后,它适用于我的情况。
I had the same issue.我遇到过同样的问题。 I had a backup of my
C:\xampp\mysql\data
folder.我备份了我的
C:\xampp\mysql\data
文件夹。 But integrating it with the newly installed xampp
had issues.但是将它与新安装的
xampp
集成有问题。 So I located the C:\xampp\mysql\bin\my.ini
file and directed innodb_data_home_dir = "C:/xampp/mysql/data"
to my backed-up data folder and it worked flawlessly.所以我找到了
C:\xampp\mysql\bin\my.ini
文件并将innodb_data_home_dir = "C:/xampp/mysql/data"
定向到我备份的数据文件夹,它完美地工作。
None of the above solution works for me.上述解决方案都不适合我。 After pasting your old mysql/data directory to your new xampp, Check if ibdata1 has all the permissions required by the current user otherwise try to grant the permissions.
将旧的 mysql/data 目录粘贴到新的 xampp 后,检查 ibdata1 是否具有当前用户所需的所有权限,否则尝试授予权限。 Then "Empty Session Data" in your phpmyadmin, solved my problem.
然后你的phpmyadmin中的“空会话数据”解决了我的问题。
C:\xampp\mysql\data
C:\xampp\mysql\data
C:\xampp\mysql\backup 4. Paste and replace to
C:\xampp\mysql\backup 4.粘贴并替换到
C:\xampp\mysql\data
Instructions for Ubuntu users: Ubuntu用户使用说明:
Copy a database (eg from the external disk backup).复制数据库(例如从外部磁盘备份)。
sudo cp -r /media/some_user/mysql/some_database/ /opt/lampp/var/mysql/
NOTE: from this moment on, the database already appears in PHPMyAdmin, but if you click on it, the tables still do not appear注意:从现在开始,数据库已经出现在 PHPMyAdmin 中,但是如果你点击它,表格仍然没有出现
Change the owner to mysql
(because when copying the owner it was changed to root
)将所有者更改为
mysql
(因为复制所有者时它已更改为root
)
sudo chown -R mysql:mysql some_database/
NOTE: from this moment the name of the tables appears but you can't see their structure or data - it shows the error "#1932 - Table 'some_database.some_table' doesn't exist in engine"注意:从这一刻起,表的名称出现,但您看不到它们的结构或数据 - 它显示错误“#1932 - 表 'some_database.some_table' 在引擎中不存在”
Copy the ibdata1
file and also change the owner.复制
ibdata1
文件并更改所有者。
sudo mv ibdata1 ibdata1_old
sudo cp /media/some_user/mysql/ibdata1 /opt/lampp/var/mysql/
sudo chown -R mysql:mysql ibdata1
Restart XAMPP重启XAMPP
sudo /opt/lampp/lampp restart
I found the following answer at https://stackoverflow.com/a/66804621 helpful我在https://stackoverflow.com/a/66804621找到了以下答案很有帮助
If you are just moving your DB from one folder to another folder, but your InnoDB tables no longer work, because they can't be found and the error message "Table does not exist in the engine" is displayed, then these pair of SQL statements can be as quick as helpful:如果您只是将数据库从一个文件夹移动到另一个文件夹,但您的 InnoDB 表不再工作,因为无法找到它们并显示错误消息“引擎中不存在表”,那么这对 SQL陈述可以尽可能快地提供帮助:
ALTER TABLE __yourtable_name__ DISCARD TABLESPACE ;
ALTER TABLE __yourtable_name__ IMPORT TABLESPACE ;
In pratice, the.IDB file is detached from.FRM file and then bound again, so that table contents turn into readable.在实践中,将.IDB文件从.FRM文件中分离出来,然后重新绑定,使表格内容变为可读。
It worked in my case.它适用于我的情况。 Hope yours too.
也希望你的。
对我来说,我从xampp\mysql\
中删除了整个data
文件夹(并进行了备份),并在此处粘贴了前一个data
文件夹,这解决了我的问题...
If you have tried all the above answers and yet failed, first try to fix your db by running this command,如果您已经尝试了上述所有答案但仍然失败,请首先尝试通过运行此命令来修复您的数据库,
mysqlcheck --repair my_db_name -u root -p mysqlcheck --repair my_db_name -u root -p
And then if issue fixed,然后如果问题得到解决,
If not fixed and you have a backup of the table with you and not able to import it to the PHPMyAdmin, do the following.如果未修复并且您有表的备份并且无法将其导入 PHPMyAdmin,请执行以下操作。
1. Go to xampp\mysql\data\database_folder 1.进入xampp\mysql\data\database_folder
2. Delete the files (with extension .frm and .ibd) starting with your table name. 2. 删除以您的表名开头的文件(扩展名为 .frm 和 .ibd)。 Eg: my_table.frm, my_table.ibd
例如:my_table.frm、my_table.ibd
3. Import your table 3. 导入您的表格
It worked for me.它对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.