phpMyAdmin on Windows Azure Web Sites
In my previous post about the migration of a WordPress site to Windows Azure I mentioned that I used phpMyAdmin to import existing blog data into a MySql/ClearDb database in Windows Azure. phpMyAdmin is a web based tool for administering MySql databases.A It can beA used to create tables, edit the data in tables, export/import/backup data and many other tasks. I found it to be an adequate tool for allA MySql db administration needs in Windows Azure. This post describes how to install and configure phpMyAdmin on Windows Azure Web Sites.
1. Create an empty site
First you'llA need to create a new site in Windows Azure.A 10 free sites are allowed per subscription andA phpMyAdmin will work fine on a free site. Create an empty site using a€oQuick Createa€¯ option in Windows Azure Portal:
2. Link the site with a MySql database
If you already have a MySql database or need to create one thenA use theA Linked Resources page to link that database with your site.
Once the database is linkedA getA the connection string by using the a€oView conneciton stringsa€¯ link on the site's dashboard page:
You will need the information from this connection string to logon to the database via phpMyAdmin. It will looks similar to this:Database=some-db-name;Data Source=some-hostname;User Id=some-username;Password=some-password
3. Download and configure phpMyAdmin
Get the latest version of phpMyAdmin from the offical site. Extract it to some temporary location on your hard drive. Create a new file with name config.inc.php in the same directory where examples, js, libraries, setup and themes directories are. Paste the following into that file:
5. Upload phpMyAdmin files to Windows Azure
Multiple upload methods are supported. I used FTP with FileZilla. FTP hostname and username can be obtained from the site's dashboard page in management portal. Once you connected via FTP, upload all the files into the /site/wwwroot/ directory.
6. Logon to MySql database
Browse to the newly created site. You should see the phpMyAdmin logon page:
Use the User Id and Password from the connection string to logon.