I used xampp sometime ago to run mysql server. I forgot to save a copy of my database. Now my hard drive has crashed and I can only use it as external drive. Using it as an external hard drive I can access the xampp installation folder but I can't seem to find copies of mysql databases.
So this is what i tried:
But I found my database names in C:\xampp\mysql\data\voting
directory, where voting is a my database name. Now, in the voting
folder, I can find all my table names but they end in some wierd
extension (.frm or .ibd) that I cannot import to a new xampp that
I have installed. For instance there is a table in the voting
database called candidate .
My problems is that is there a way I can retrieve my database from the xampp installation folder?
If NOT, How can I get mysql database using xampp(Without sql,csv or json files)
NOTICE: The xampp directory is an old one and I cannot run it because it is on a hard drive that is slightly crashed and can be access externally to a computer.
After posting this for 3 days and getting no answer, i toiled and toiled until I got an answer.
What I did was I copied the data folder in C:\xampp\mysql directory where I installed xampp from my old xampp installation folder on my old hard drive.
I pasted the old data folder I copied into C:\xampp\mysql directory of my new hard drive.
NOTICE: there is an already existing data folder there, so I backed up before doing any changes.
Finally, I opened http://localhost/phpmyadmin/ in my browser and I can now see all my old MYSQL databases.
Related
After installing a new window on my laptop, my databases got lost because I installed new xampp again in c drive. Before changing window, xampp was installed in f drive instead of c drive. So, right now, I have two xampp folders. 1 is in C drive (newly installed) and other is in F drive (old xampp). And that old folder is still having all projects and files as it is. But now the problem is that when I open "localhost/...", It opens mySql where no database exists. Is there any way to get my .sql databases back to original so that I can save a lot of time of mine.
Thanks a lot.
It's impossible to locate your old db...
you can only access your db with tables but can't recover you data in the tables...
Follow this...
Drive location:\xampp\mysql\data
Here you can find you db..
Just copy db that you want and place that into your newly install xampp(mysql\data).
I uninstalled XAMPP from my pc, during the uninstallation the system asked me if wanted to delete htdocs folder (I selected "yes" because I made a backup of this folder before the uninstallation), after that the system asked me if I wanted to delete Mysql data and I selected "NO".
After the uninstallation I had still some folder in C:/xampp (also mysql folder).
Now I reinstalled XAMPP but is there a method to restore DB file with the folders that I have?
I tried to replace the mysql folder but it wasn't a good idea.
This is a screenshot of the folders that are remained after the uninstallation:
The databases are stored on xampp\mysql\data location on this location you find the folder for each database in this folder you have file db.opt and also two file for each table that is (yourtableName.frm and yourtableName.ibd)
something like....
if you put that all dbfolder (in mycase i.e. "empdb") in to above location you will get your database back to used
Hope it make sense
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.
Disclaimer: I have never used MySQL before!
I have a folder containing a number of .frm, .myd and .myi files that I believe are a MySQL database. I have pulled these files from a defunct server for a client who has not used the server or database for some years but is now looking to resurect some of the data for a new venture.
I have downloaded the latest free edition of MySQL, along with MySQL Workbench and am looking to connecct the existing database to the new installation; the equivalent to an "Attach" if I were using MS SQL Server.
I have found a few articles that say if I simply copy the folder into the data folder for MySQL and restart the service the database will show up. I have tried this (using both the data folder within the installation folder and also the "MySQL Datafiles" folder created during the intial configuration but when I restart the service nothing shows up.
How should I go about attaching this database?
Ok. I found the answer, the folder I was adding the database to was the wrong one.
Though I had found 2 "data" folders, there was a 3rd hiding in C:\ApplicationData; once I added my data files in here and restarted the MySQL service I could see the data.
On Windows 8 the default folder where MySql databases are stored is:
C:\ProgramData\MySQL\MySQL Server 5.6\data
5.6 is the version.
Please note it is ProgramData not Program Files which is easy to overlook.
Copying there and restarting the service worked fine for me. I'm even copying the DBs from an earlier 5.X version.
I had a catastrophic drive failure on my development machine. Fortunately I have a backup of everything.
I just installed WAMP for the first time, and it seems to be working in windows 7 x64 (after the fresh install on a new drive). Now I need to get access to the databases I had stored on the backup drive..I don't have .sql dump files.
Does anyone know how I can get a database export from the MySQL folder I have on my backup drive?
Thanks!
A simple copy of files and folders located in MySQL data directory should do the trick (as long as MySQL versions are the same).
Not sure wheteher this will work . Just replace the your mysql folder in wamp installation directory with yours. Remember to keep back up before replacing