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
Related
I was trying to delete other file but mistakenly I did shift+del for my mysql folder under Xampp. Now my entire application running in localhost is not able to locate mysql. My bad!!
Is there any way out to recover that folder or reinstall just the mysql in Xampp. I tried Easeus and Yodot software for folder recovery but none of them proved no luck to detect my permanently deleted folder.
Please suggest me what can be the alternative way out.
P.S. I am having my mysql config file backup saved.
I think the simple and better way is reinstall the xampp e.g to folder xampp2 then move your script into the htdocs of the new install
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 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.
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.
I had few databases related to different projects in the WAMP. I don't know what happened, Today, when I go to PhpMyAdmin, I was just able to see the default databases and rest of my databases are not showing and even the php code related to those databases are throwing database not found errors. But when I go to "D:\wamp\bin\mysql\mysql5.1.30\data" the folders with my DB names are there. But not sure how to restore those DBs and I don't have any backup of the DB, Can any one help me how to restore them?
You can copy these file to another location and reinstall the same WAMP version after installtation copy them back to original location.
Please note that your WAMP version should be same, because if the version will change then mysql version will also be change.
Another method is to utilise Window's "Restore previous versions" feature. Right click the wamp folder (usually in C:\, click Restore previous versions and select the most recent date you know it was working.
Note: This will also revert mysql data - so you'll lose any changes after the date you select, but I have used this in the past when I needed to get my whole wamp system back to a working state when something had broken it.
Have you checked my.ini file? Just find datadir it should refer to db folder (e.g datadir=D:/Wamp/bin/mysql/mysql5.1.30/data) - goodluck :)
Copy the complete data folder from old wamp mysql folder to new mysql folder and then inside data folder change the name of the file mysql-bin.index to mysql-bin.index-corrupt. Then restart WAMP. That's all.
reinstall Wamp Server that must be same version. After reinstall if wamp show red icon 1. go to wamp -> apache -> services ->test port 80.
if its available . then apache -> services -> install services.
2. mysql-> services -> install services.
after that restart wamp..
100% work
Copy data folder and reinstall same version of WAMP.
Once installation is completed, go to data folder: inside replace only ibdata1 file from existing folder.
After starting WAMP, check phpmyadmin: you'll get all database and tables with data.