I had to format my Mac as updating OSX Crashed. I had the backup of the XAMPP folder on my disk. Is there a way I can copy some files to the newly installed XAMPP folder and get all databases back?
Do I make any sense?
I tried copying all folder but XAMPP failed to start throwing Requires Admin Privileges
Note: I have no recent .sql backup of the databases.
I once had the same problem. It's not that complicated.
Just copy the folders of database to XAMPP/var/mysql/
That's all.
Related
Here is my problem:
Because of some issues mysql not working in XAMPP 3.2.2 in windows 7. Then phpmyadmin in localhost shows Access Denied. So I want to reinstall the XAMPP. But, I'm unable to take backup of databases through phpmyadmin. Now how can I get the backup of databases. If I have the backup of data folder in xampp -> mysql then I'll copy the folder in new xampp folder then I'll get all my old databases with content or not. Is there any other way to get the backup of database?
Please help me to resolve my problem.
Short Answer: Yes, you will be able to recover.
Copy content from your /installation_path/xampp/mysql directory to your desired location.
ReInstall and copy back the content.
Restart your services.
[or]
If you have your backup in a Folder, do the following:
datadir = "your/path/mysql/backupdata"
in xampp/mysql/bin/my.ini
I have uninstalled the old XAMPP and deleted all of the content of d:\xampp folder and installed the new one. When I copy my backup folder (with the name of my database, containing all .frm and .opt files) to the D:\xampp\mysql\data, the database shows in the list in phpmyadmin but it has no tables and data. What I've done wrong?
tables are show in the database but while clicking on table its saying file doesn't exist..
Probably you have not deleted the main file phpmyadmin
You should to search phpmyadmin in xampp file and delete phpmyadmin and past you're file in xampp again
before you past phpmyadmin be sure you've delete it completely
When you restore old mysql\data\ to new installed xamp, your newly installed xamp version must be same as old xamp version.
Then only restore data will work. its worked on my xamp
Unfortunately I uninstalled Xampp in my windows machine, there are about 50 databases in /xamp/mysql/data folder. I have not taken backup script, but I have a copy of Xamp/mysql/data folder.How can I restore MySQL Databases using that Data Directory.
Thanks in Advance
I was find out solution
Install new xampp
Copy your old database folder from
xampp\mysql\data\databasefolder to Paste in your running xampp folder
C:\xampp\mysql\data
After that stop mysql and apache service then backup your running xampp files ib_logfile0,ib_logfile1 and ibdata1 and store in safe place
Then Copy same file (ib_logfile0,ib_logfile1 and ibdata1) from old
xampp\mysql\data\ and paste in your running xampp server C:\xampp\mysql\data\
Start mysql and apache service Open CMD Fire command
C:\xampp\mysql\bin>mysqldump -u dbusername -p dbpassword dbname>D:\exportdb.sql
stop mysql and apache service and restore your main ib_logfile0,ib_logfile1 and ibdata1 file (check Step 3)
after than again start service and open http://localhost/phpmyadmin/ and import database backup from D:\exportdb.sql
Now your backup is working :)
Install the same Server version again, Stop it , copy the datadir and Start the servrr
I experienced with my Mac, before selling to a friend simply copy the XAMPP folder only to my hard drive.
(NOT SUCCESS) Unfortunately, it was bringing trouble to me, because I tried the following steps:
- I install fresh XAMPP and copy the whole \httdocs and var\mysql to my new Mac, those db only with .frm and .ibd, NOT WORKING, I can't still access the tables inside PHPMyAdmin ...
- I tried to install the same xampp version and repeat the above steps, still NOT WORKING.
- Decided to go to bed.
(SUCCESS)
- This morning, I brought my backup disk and try with Windows 7.
- Install fresh latest XAMPP for Windows, c:\xampp
- I have one of website (folder) from my backup \httdocs and correspond database folder inside \var\mysql are READY in my windows 7, I just want to try with one website then try the rest because I have many projects inside httdocs\ and \var\mysql
- I copy the mention httdocs\ folder to windows c:\xampp\httdocs and copy the \var\mysql to c:\xampp\mysql\data
NOT LAST YET
I copy the ib_logfile0, ib_logfile1, ibdata1 from my backup file to windows xampp c:\xampp\mysql\data
I refresh the http://localhost/mywebsite
WOW WOW DONE ... it's working...
In my case I found pretty straight solution.
I had db files in wamp and ported to laragon
Stopped laragon instance, no apache/mysql was running.
I have simply copied db folder[dbname] "example /mysql/data/dbname" from wamp to laragon "/mysql/data/" folder
Than I started my laragon instance both apache/mysql.
I have checked in phpmyadmin, I can see same database was recovered and now part of current mysql database.
I reinstalled my computer, before I did that, I copy my Xampp folder for backup.
the problem is i forget to backup my database from Phpmyadmin.
I tried to copy /xampp/mysql/data/ to new one but i got error
#1932 - Table 'phpmyadmin.pma__tracking' doesn't exist in engine
anyone how to fix this?
*browser is ok to access those data, but i have trouble to open it inside of phpmyadmin
If you are using windows, run a linux live cd and copy the xampp folder into your external drive then go to the target computer, run again live cd on the target computer or just boot it in safe mode(for windows) then copy the xampp folder into your target computers drive.
I was working with XAMPP 1.8.3-3 on OS X Mavericks. After upgrading to Yosemite Mysql server stopped working. And an upgrade to XAMPP 1.8.3-5 fixed the problem and mysql server starts working.
Now the entire database list is showing on phpmyadmin, but no access to the tables. Its showing “#1146 - Table ‘DB_NAME.TABLE_NAME’ doesn’t exist”.
Unfortunately I don't have any DB backup!
I have the entire XAMPP folder backup. So how I can able to retrieve the mysql tables?
just type /Applications/XAMPP/xamppfiles/bin/mysql.server start
in terminal then start xampp
you can restore if you have all the mysql folders from XAMPP folder. (check /XAMPP/xamppfiles/var/mysql in backup)
if you have var/mysql folder, open and look for database names you had earlier.
there is a separate folder for each database you had earlier. open the folder and it will contain lots of files with table names.
if your old table engine is InnoDB you will see 2 files. with .frm and .ibd extensions.
or if you had MyISM it will contain three file per table which has .frm, .MYD and .MYI extensions.
after you verify you have all the required files in backup, you can start restoring them.
stop mysql
copy required database folder completely and paste it to currently installed folder. (/Applications/XAMPP/xamppfiles/var/mysql/)
start mysql
to restore web files, open htdocs folder in backup and copy required site folder to currentely xampp installed htdocs folder.
This solution worked for me. Good Luck !
Do a clean install. See my answer for my own question. xampp mysql server not starting. The bad part is that I'm not sure if it will save your database the way I explained. What you might try is going to xampp > xamppfiles > var > mysql > 'your database name' and making a copy of the database folder on your desktop and moving it back once you reinstall it. I tried and I think it might have worked had I changed the file permissions. You can also try experimenting to see if it preserves the database if you do this. I would do some serious testing if you really want to save your database before doing this.