Skip to content

Latest commit

 

History

History
83 lines (47 loc) · 4.4 KB

create-mysql-db.md

File metadata and controls

83 lines (47 loc) · 4.4 KB

#How to Create a MySQL Database in Azure

This guide will show you how to use ClearDB to create a MySQL database from the Azure Store and how to create a MySQL database as a linked resource when you create a Azure Web Site . ClearDB is a fault-tolerant database-as-a-service provider that allows you to run and manage MySQL databases in Azure datacenters and connect to them from any application.

##Table of Contents

Note

When you create a MySQL database as part of the Web Site creation process, you can only create a free database. Creating a MySQL database from the Azure Store allows you to create a free database or choose from paid options.

How to: Create a MySQL database from the Azure Store

To create a MySQL database from the Azure Store, do the following:

  1. Log in to the Azure Management Portal.

  2. Click +NEW at the bottom of the page, then select STORE.

    Select add-on from store

  3. Select ClearDB MySQL Database, then click the arrow at the bottom of the frame.

    Select ClearDB MySQL Database

  4. Select a plan, enter a database name, and select a region, then click the arrow at the bottom of the frame.

    Purchase MySQL database from store

  5. Click the checkmark to complete your purchase.

    Review and complete your purchase

  6. After your database has been created, you can manage it from the ADD-ONS tab in the management portal.

    Manage MySQL database in Azure portal

  7. You can get the database connection information by clicking on CONNECTION INFO at the bottom of the page (shown above).

    MySql connection information

How to: Create a MySQL database as a linked resource for Azure Web Site

To create a MySQL database as a linked resource when you create a Azure Web Site, do the following:

  1. Log in to the Azure Management Portal.

  2. Click +NEW at the bottom of the page, then select COMPUTE, WEB SITE, and CREATE WITH DATABASE.

    Create website with database

  3. Provide a URL for your web site, select the REGION for your site, and choose Create a new MySQL database from the DATABASE dropdown. Optionally, you can replace the default name for the connection string. Click the arrow at the bottom of the page.

    Provide website details

  4. Provide a database NAME, select the REGION for your database (this should be same as the region for your web site), agree to ClearDB's legal terms, and click the checkmark at the bottom of the frame.

    Provide MySQL details

  5. After your web site has been created, click on the name of your site to go to your site's dashboard.

    Go to web site dashboard

  6. Click on CONFIGURE.

    Go to configure tab

  7. Scroll down to the connection strings section and click Show Connection Strings.

    Show connection string

  8. Copy the connection string for use in your application.

    Shown connection string

[WACOM.NOTE] Connection strings are accessible to your web site application by connection string name. In .NET applications, connection strings are availble in the connectionStrings object. In other programming languages, connection strings are accessible as environment variables. For more information, see How to Configure Web Sites.