Want to locate old databases - mysql

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

Related

Recovering MySQL data from external drive

AN older PC I was using has decided to give up completely but I've at least salvaged the HDD and mounted it on an external drive to the new Linux box (running Ubuntu Server 22.04). I'm trying to get the data off the old drive into the new installation so I can still work with the data on it. What's the easiest wary to get this done? (Me and MySQL have had many fallings out in the past!!) Thanks.
UPDATE
I've copied across a folder from within the old mysql folder to the new one but it isn't listed in the lists of databases. I tried to create it in mysql but it told me the schema directory already exists, so at least I'm in the right place.
SOLVED! Copied out the new mysql folder and swapped in the entire new one. As I wanted a clean install I then dumped the databases I wanted and swapped the original folder back before importing the dumped sql files. Phew!

How to get MYSQL database from Xamp

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.

Mysql database didn't working after overwritting installing wamp.

I am using wamp server. I have made some project and there are some also databases.
I install new window and then i install wamp server in same drive where the wamp sever is.
After installing wamp my project file in "www" are present as pervious but in phpMyAdmin there is only database name is present when I open it there is no table. where the tables gone ???
I check the "wamp>mysql>data". Here the files are present of that tables but it does not show in the phpmyadmin.
I need these tables how can I recover it.
I suggest to you ,use the feature in windows called "restore previous versions" .
Right click the Wamp folder click Restore previous versions and select the most recent date you know it was working,it maybe work for you.
I assume you mean that you did ...
Install new windows.
Install WampServer on new windows
Copy my old\wamp\www folder to the new install
Copy the subfolders in \wamp\bin\mysql\mysql{version}\data to the new install
If this is correct, then dont forget to copy the contents of \wamp\bin\mysql\mysql{version}\data as well. If you are using INNODB database the actual data lives in the ibdata1 file in that folder.

XAMPP NOT WORKING! - OS X Yosemite

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.

How can I get a database out of a Windows 7 MySQL Database stored on a backup hard drive?

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