Sunday, September 6, 2015

How to connect Ionic mobile application with MySQL database and retrieve data using PHP.(Section 1)

In this Section we discussed how to Setup Wamp server and create Database using MySQL.

Part I: Install Wamp server

Download server from
It conclude Apache server with MySql & PHP.
After Install Wamp server Double click icon and Run. With default server run on http://localhost:8080.but sometimes error comes because we use that port to run another server like IIS in our machine.
Fix that error you need to Left Click Wamp icon -->Apache --> httpd.conf

In that file in line 62, 63 and 221 you need to change port number and save file. I’m change it to 81      

After that you can check the server using http://localhost:81/. if You can see this kind of page then your successfully with first stage.

Go to place you install wamp and go to www directory. Create new folder inside that and rename it. You can use that folder to store your .php code files. Refresh your browser and you can see your folder under Your Project in that page.

Part II: Create Database using MySql

You can create database using
i)                    Left Click Wamp iconàMySQLàMySQL console

ii)                  http://localhost:81/phpmyadmin/

iii)                MySQL workbench

I’m using second method.
Create new databaseàclick new link in left side top, type “Database_Name” and click Create button. I create FirstDB database.

Create tableàclick “Database_Name” in left side bar and give table name and number of columns and click Go button. I create Employee table.

Fill column name, type and length and click save.

Insert Data to Employee table click insert link.

Then fill the details. Click Go button.

You can see insert details by using SQL tab and type sql command
Select * from Employee
Next Section we discussed How to create new Ionic application and connect with MySQL Database using PHP ..To be Continue...


  1. Replies
    1. This comment has been removed by the author.

  2. this is really great thank you..

    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.

  3. after i changed the 'listen:81' , i still cant access the localhost page.. help?

  4. thanks mr krishnan,

    very good explaination.. still waiting for the next tutorial.

  5. Will you please post login with php mysql ionic code