Using PHP and MySQL with IIS and Visual Studio and MS Azure
Install PHP
- IIS > Get new web platform components > Web Platform Installer opens > Search PHP
 - Add and install PHP 5.6.0, PHP Manager for IIS,
 
Turn on CGI
- Programs & Features > Turn Windows features on or off > Internet Information Servers > World Wide Web Services > Application Development Features > CGI
 
Create an IIS Website
- IIS > Websites > New Website > Point it at the wwwroot
 - Set ACL for the wwwroot so IIS can access it.
 
Access DB via MySQL Workbench
- Get ClearDB connection string via Azure Website Dashboard > View Connection Strings
 - 
        Setup New Connection in MySQL Workbench by parsing the cx string as follows:
        
- Hostname –> Data Source
 - Port –> 3306
 - Username –> User Id
 - 
             Password –> same
             
- Important: Clear the value before changing the password ,
 - otherwise, the Workbench will use the cached password.
 
 
 - Default Schema –> Database
 
Backup DB via MySQL Workbench
- Open the database connection.
 - Open the Sidebar with View > Panels > Show Sidebar
 - On the Sidebar, choose the Management tab.
 - Under Management, choose Data Export
 - 
           The Data Export dialog will open.
           
- Under "Select Database Object...", choose your database.
 - Under "Options", choose Export to Self Contained File (for wholesale restore)
 - Choose the location of your export (the default is /Documents/Dumps)
 - Click "Start Export"
 
 
Connect to the a Local MySQL Server
- Make sure you have MySQL installed.
 - 
        In PowerShell, navigate to C:\ and then run
        
gci mysqld.exe -r. - You can also check the Service Control Manager for "MySQL" service.
 - If you can find it, then you have MySQL installed.
 - Else, install from: http://dev.mysql.com/downloads/windows/installer/
 - Run the installer.
 - Choose "Add" to install MySQL Server.
 - Then following this tutorial: http://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
 - If you don't know your root password, change it using these instructions: http://stackoverflow.com/questions/8232039/reseting-mysql-workbench-root-password
 
Drop/Import Database from MySQL Workbench
- Drop. Connect to a MySQL Server. Then File > New Query. Then run DROP DATABASE <database-name>;
 - Import/Restore. Connect to a MySQL Server. Then View > Panels > Show Sidebar. On the Sidebar, choose Management > Data Import/Restore
 - Import from Dump Project Folder OR Import from Self-Contained File
 - Browse to the file. E.g.
 - OneDrive\
 - Documents\
 - BigFont\
 - Clients\
 - 2014-123ST\
 - backups\
 - studio-tour-website\
 - mysqlbackups\
 - ssstudio_wp-2014dec16.sql (this is a Self-Contained File)
 - Click Start Import