Showing posts with label database. Show all posts
Showing posts with label database. 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, 9 November 2017

How to create a database in MySQL or MariaDB using phpMyAdmin ?

"phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement."
                                                                                                                   From phpMyAdmin website

As all we know that MySQL database comes in command line based to operate it, and does not provide any graphical user interface to handle easily. So phpMyAdmin gives the GUI to operate the database.

Let see how we can create a database in phpMyAdmin. 

Note :- I have used Ubuntu 16.04 OS, MySQL version 5.7.19-0ubuntu0.16.04.1 - (Ubuntu) and phpMyAdmin version 4.5.4.1deb2ubuntu2

Open any browser available in your system. And type

 http://localhost/phpmyadmin

On some systems, URL may very according to, what port it is using. If it is using port 80 just type above URL, otherwise type URL with port, like-

http://localhost:8080/phpmyadmin. If server is using port 8080.

You will see login page. Enter username and password, you have created during installation. Default username is root.
After login you will see phpMyAdmin home page, like-


Click on Databases, write the desired database name and then click create.


Now click on database name in left pane and create table.


This is how you can create database using phpMyAdmin.

You can also use phpMyAdmin for -



  • Intuitive web interface
  • Support for most MySQL features:
    • browse and drop databases, tables, views, fields and indexes
    • create, copy, drop, rename and alter databases, tables, fields and indexes
    • maintenance server, databases and tables, with proposals on server configuration
    • execute, edit and bookmark any SQL-statement, even batch-queries
    • manage MySQL user accounts and privileges
    • manage stored procedures and triggers
  • Import data from CSV and SQL
  • Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 - OpenDocument Text and Spreadsheet, Word, LATEX and others
  • Administering multiple servers
  • Creating graphics of your database layout in various formats
  • Creating complex queries using Query-by-example (QBE)
  • Searching globally in a database or a subset of it
  • Transforming stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link
  • And much more...

You can download and know more about phpMyAdmin from here.

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