Showing posts with label recovery. Show all posts
Showing posts with label recovery. Show all posts

Friday, 22 March 2019

How to recover data/databases/tables from mysql in WAMP server.

Suppose you are running WAMP server on your local system and due to bad luck your WAMP server got corrupted or unable to start. You must have created some databases and tables in your MYSQL, then you would be unable to access these data. So, now here question arises that, any how we can get this data/databases/tables and recover our databases and tables.

Answer is "yes".

There might be several ways to recover data, but what I applied was very simple and hassle free. Let see, how I recovered my data.

I have applied this method on WAMP Server 3.1.7 on 64 bit Windows Server 2016.

Copy your old WAMP server data of location your_root_wampserver_folder\bin\mysql\mysql5.7.24\data ( in my case it was D:\wamp64\bin\mysql\mysql5.7.24\data ). Copy either data folder or data of data folder for recovery to any location.

Note:- You can see your all databases name as folder in data folder, you have been previously created.

Now back up your new installed WAMP server MYSQL data folder (location your_root_wampserver_folder\bin\mysql\mysql5.7.24\data) data to any safe location.

 After backing up after data folder of your new system, copy the old data folder to new data folder.

Important :- Both WAMP versions should be same.

Thursday, 23 August 2018

Recover your MYSQL database if nothing works in Ubuntu/Linux.

Recently I stuck in a situation where after spending many days I couldn't resolve the my MYSQL database connectivity in my Ubuntu system. Although I tried many solutions available on the Internet, but I was unable to resolve it.

Rather than solving my problem I thought that I have made the situation more worst then earlier because of my many hit and try on the server. However, I read at many location to keep a backup of my databases. So I was saved /var/lib/mysql directory it somewhere else.

After no success, I tried to restore databases from my mysql backed up the directory in Ubuntu after a fresh installation of MYSQL database server.

So I was copied /val/lib/mysql folder before a new installation of MYSQL. After successful installation of MYSQL server I tried to restore all my databases in  new MYSQL server like this -

Open a terminal and copy/restore your saved database to MYSQL server using the command-
(I have saved my database to Desktop and database name is itcentre)

sudo cp -r Desktop/mysql/itcentre /var/lib/mysql

enter your sudo password

after coping your database file also copy these files of your /var/lib/mysql folder to the server



sudo cp  Desktop/mysql/ibdata1 /var/lib/mysql
sudo cp  Desktop/mysql/ib_logfile0 /var/lib/mysql
sudo cp  Desktop/mysql/ib_logfile1 /var/lib/mysql
sudo cp  Desktop/mysql/debian-5.7.flag /var/lib/mysql

sudo chown -R mysql:mysql /var/lib/mysql


if there is no error your database is successfully restored to MYSQL server.


Good luck !!!

Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...