Prerequisites
- Microsoft Azure Subscription (MSDN subscribers or sign up for one month free trial).
- Visual Studio 2013 or Visual Studio 2015. To download web installer or ISO file, please click here.
You will learn:
- How to create SQL Server.
- How to create SQL Database.
- How to connect SQL Database to teh Visual Studio.
Getting Started with SQL
To learn how to create SQL database on Microsoft Azure, please refer to the below article:
Getting Started with PHP Website
Step 1: Click on “All resources” & choose MySQL Server.

Note: If you do not see the option for Firewall on the blade you are looking at, go back and make sure that you are looking at the blade for the SQL Database logical server and not the blade for a SQL database.
Step 2: Click on “All Settings” option & select “Firewall” from the list. Add client ip to the firewall rules & save it.

Step 3: Now, select MySQL Database & click on “Show database Connection strings”. All connection strings are available here like, ADO.NET, ODBC, PHP, JDBC.


Step 4: Start Visual Studio 2013 or 2015. Open Server Explorer (if not available select View Menu -> Server Explorer).
Right click on Data Connections & select “Add Connection…” option.

Step 5: Choose Data source as Microsoft SQL Server. Copy Server name from Azure Portal. Enter SQL Server Authentication – Username & Password. Within a few seconds, database name will show in the drop menu.

Step 6: After successful connection, we need to create Table. Right click on Tables folder & select “Add New Table” option.

Step 7: First, click on Id column & change the Identity to True value.

Complete Table Definition, available below.

Update Database.

Just right click on Tables folder & select refresh option to get new table.

Step 8: Open notepad or any other editor. Copy the below code and save it as index.php.









Vivek KumarPosted Aug 2, 2016, 1:33 PM
Nice
Shobana JPosted Jul 16, 2016, 6:33 AM
Nice one
jaymin sutharPosted Jul 16, 2016, 2:26 AM
Nice
Vignesh ManiPosted Jul 15, 2016, 4:29 PM
Nice