Reputation: 691
Xampp error after moving xampp folder:
Apache is running fine:
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. please solve the issue anyone help pls
Upvotes: 68
Views: 450109
Reputation: 67
Just copy all file which start from ib from old mysql/old-data folder and paste all of these on mysql/data folder
Upvotes: 1
Reputation: 149
copy from your old xampp xampp\mysql\data\ibdata1
and
copy theNameOfdatabase
from xampp\mysql\data\theNameOfdatabase
then
Then paste to your xampp new xampp\mysql\data\ibdata1
,
and xampp\mysql\data\theNameOfdatabase
and than open your xampp controller and stop mysql and start again.
basically you are replacing the ibdata1 and copying your database file from your old xammp
Upvotes: 0
Reputation: 11
If you have tried every possible solution above and still are not able to solve, you may be able to try this:
Upvotes: 0
Reputation: 294
Try these steps
Upvotes: 0
Reputation: 1779
I found the following answer at https://stackoverflow.com/a/66804621 helpful
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:
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.
It worked in my case. Hope yours too.
Upvotes: 0
Reputation: 6534
Instructions for Ubuntu users:
Copy a database (e.g. 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
Change the owner to mysql
(because when copying the owner it was changed to 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"
Copy the ibdata1
file and also change the owner.
sudo mv ibdata1 ibdata1_old
sudo cp /media/some_user/mysql/ibdata1 /opt/lampp/var/mysql/
sudo chown -R mysql:mysql ibdata1
Restart XAMPP
sudo /opt/lampp/lampp restart
Upvotes: 1
Reputation: 363
C:\xampp\mysql\data
C:\xampp\mysql\backup 4. Paste and replace to
C:\xampp\mysql\data
Upvotes: 2
Reputation: 168
You could:
After solving the problems, get output power from the database
Upvotes: 13
Reputation: 2049
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. You can find it from \xampp\mysql\data
And restart your mysql.
Upvotes: 17
Reputation: 173
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
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.
1. Go to xampp\mysql\data\database_folder
2. Delete the files (with extension .frm and .ibd) starting with your table name. Eg: my_table.frm, my_table.ibd
3. Import your table
It worked for me.
Upvotes: 0
Reputation: 246
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.
i tried this and is work for me
Upvotes: 2
Reputation: 517
For me I removed whole data
folder ( and took a backup ) from xampp\mysql\
and pasted data
folder of previous one here which solved my problem...
Upvotes: -2
Reputation: 111
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. Then "Empty Session Data" in your phpmyadmin, solved my problem.
Upvotes: 0
Reputation: 345
I had previously moved my mysql directory and forgot to change ALL references to the old location in \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
#innodb_log_arch_dir = "/programs/xampp/mysql/data"
Upvotes: 2
Reputation: 643
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:
phpmyadmin
folder and ibdata1
from your new installation form this location xampp\mysql\data
.old-xampp\mysql\data
and copy the ibdata1
file and phpmyadmin
from old location.xampp\mysql\data
and past them there.Upvotes: 10
Reputation: 1
I had the same issue. I had a backup of my C:\xampp\mysql\data
folder. But integrating it with the newly installed xampp
had issues. 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.
Upvotes: 0
Reputation: 81
Upvotes: 8
Reputation: 1765
Copy the ib_logfileXX and ibdata file from old mysql/data folder to the new mysql data folder and it will fix the issue
Upvotes: 95
Reputation: 1963
I have faced same issue and sorted using below step.
C:\xampp\mysql\bin\my.ini
)innodb_data_file_path = ibdata1:10M:autoextend
ibdata1
file exist under C:/xampp/mysql/data/
ibdata1
file from location C:\xampp\mysql\backup\ibdata1
hope it helps to someone.
Upvotes: 64
Reputation: 17
backups
folder into data
folder. This worked for me. Upvotes: 0