40

Xampp error after moving xampp folder:

enter image description here

Apache is running fine:

enter image description here

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

Shadow
  • 32,277
  • 10
  • 49
  • 61
Yagya Bashyal
  • 411
  • 1
  • 4
  • 3
  • Check whether you have any luck with this [post](http://stackoverflow.com/a/33925030/5850835) and this [post](http://stackoverflow.com/a/25040628/5850835) – Thush-Fdo Aug 04 '16 at 09:07

14 Answers14

46

I have faced same issue and sorted using below step.

  1. Go to MySQL config file (my file at C:\xampp\mysql\bin\my.ini)
  2. Check for the line innodb_data_file_path = ibdata1:10M:autoextend
  3. Next check the ibdata1 file exist under C:/xampp/mysql/data/
  4. If file does not exist copy the ibdata1 file from location C:\xampp\mysql\backup\ibdata1

hope it helps to someone.

Rohan Patil
  • 1,779
  • 1
  • 20
  • 36
36

Copy the ib_logfileXX and ibdata file from old mysql/data folder to the new mysql data folder and it will fix the issue

Nava Bogatee
  • 1,105
  • 11
  • 15
9

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.

Jay Momaya
  • 1,548
  • 16
  • 27
6

Don't copy ibdata1 file

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.

Abd Abughazaleh
  • 2,962
  • 1
  • 27
  • 42
  • This means we cannot copy the table folder only for backup or other purposes. It needs to be copied all data folder instead. – GeneCode Nov 22 '21 at 09:39
4
  1. stop mysql
  2. copy xampp\mysql\data\ib* from old server to new server
  3. start mysql
kan
  • 41
  • 1
4

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:

  1. Backup the phpmyadmin folder and ibdata1 from your new installation form this location xampp\mysql\data.
  2. Then Go to your old xampp folder old-xampp\mysql\data and copy the ibdata1 file and phpmyadmin from old location.
  3. Then open your new xampp folder xampp\mysql\data and past them there.
  4. Start the xampp servers.
Nazari
  • 358
  • 5
  • 18
2

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

Taufik Hasan A
  • 126
  • 1
  • 2
1

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"
Zurupupz
  • 305
  • 2
  • 11
0
  • Copy the content of backups folder into data folder. This worked for me.
  • After this you have to reconfigure innodb files of your existent databases
Nagama Inamdar
  • 2,813
  • 22
  • 39
  • 47
lsfiege
  • 17
  • 4
  • 6
    Welcome to Stackoverflow. Would you mind extending your answer little bit more, for fellow programmers, to understand how it helped to solve the problem. – Nagama Inamdar Dec 28 '16 at 04:42
  • 2
    Can you explain your second point? Because first point worked for me and now I lost all the data. I can see the list of tables but when I click on any, says table does not exists in the engine. – Vipul Hadiya Sep 11 '19 at 06:32
  • @VipulHadiya did you find any solution? I am currently stuck with the same problem as yours. – Raju Ahmed Sep 15 '20 at 12:03
  • @RajuAhmed No, fortunately, I had backup of every single database so I have deleted them all and imported all SQL one by one. – Vipul Hadiya Sep 15 '20 at 16:06
0

I also had same issue on my mac. I was running 5.3.0 version. I removed that version and installed 7.2.1 version. After this it is working in my case.

Amol J
  • 109
  • 2
  • 12
0

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.

milanbalazs
  • 4,185
  • 4
  • 18
  • 41
Abu Mutea
  • 1
  • 1
0

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.

Jerry Sam
  • 57
  • 1
  • 6
0

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.

Jopsy
  • 49
  • 8
-1

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...

Muhammad Bilal
  • 429
  • 5
  • 12