locked
How to Backup and/or Manage MySQL running on Windows Azure Websites? RRS feed

  • General discussion

  • During CTP (Preview) our experience for managing MySQL is sub optimal. We are working on a fix to address this for General Availability. The only places where you will see the MySQL DB is in the list of “Linked Resources” and when you try to delete a website using the MySQL DB, we prompt you to delete it.

    We hope to have much better SQL DB management like experience for MySQL as well. In meanwhile, there are various workarounds. You can use Web Matrix to download MySQL locally. Follow these steps.

    • Download and install Web Matrix on your local machine. (You can also click on Web Matrix button from the portal and it will do the setup and publishing profile import steps for you automatically)
    • Download publish profile (assuming MySQL DB is linked resource)
    • Open web matrix.  On dashboard “Open Site à  Remote Site”
    • Import Publish profile
    • When site opens there should be a download button in the ribbon.
    • When you click the download button it will have the same effect as what the “Web Matrix button” in the portal would have had.
      • It will install MySQL locally if not existing
      • It will download MySQL DB locally as well. 
      • Now you can use any MySQL UI or Script to back up your DB

    Another alternative is,

    1. Please go to your web site      in the management portal, and click “DASHBOARD”,      and click the “View connection      strings”. Here is a sample of my Word Press web site.

    1. Install MySQL management      UI tool, I use MySQL workbench.
    2. Connect to your MySQL      database using the connection information found in step 1.

    1. Now, you can manage your      MySQL database like an on-premise database, including backup.

    Apurva Joshi, This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, June 12, 2012 7:15 PM

All replies

  • Sub-optimal? How about non-existant.

    Without mysql and mysqladmin, or better, phpmyadmin, converting say a WordPress blog to Azure websites is practically impossible. The alternatives here just aren't worth the effort.

    Wednesday, June 13, 2012 6:38 PM
  • Hi Alex,

    The team is fully aware of this and is working on making this experience better in future release. Thanks again for trying out Windows Azure Websites. Your candid feedback like this will help us make the product better.

    Thanks,

    AJ


    Apurva Joshi, This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, June 13, 2012 6:59 PM
  • Excellent. Using MySQL Workbench is brilliant. Thanks for the info.
    Thursday, November 22, 2012 11:07 PM
  • Having spent several days trying to create the backup of my WordPress site hosted at Azure without using WebMatrix, I can sympathize with Alex' view, as I finally got nowhere, despite using all recommended (mysql, mysqldump, phpmyadmin) tools.

    There are so may claims by different vendors that they support what I need that to just read them to assess whether using them makes any sense takes days. It seems that John Papa has the best advice - but even that is incomplete for a WordPress/PHP/MySQL novice; there is no information what all needs to be changed in the set of Azure bases source files once the "sqldump" is used to create the local copy of the site's database.

    AJ - is there any update on when will this situation improve? After all, it is 8 months since your last post :-)


    Nik


    • Edited by Nik Ivancic Wednesday, February 13, 2013 12:04 AM
    Wednesday, February 13, 2013 12:03 AM
  • I have created a phpMyAdmin free site under my subscription and use it to manage MySQL database for my site. It was relative easy to setup and work well for database backup/restore.

    http://ruslany.net/2012/12/phpmyadmin-on-windows-azure-web-sites/


    http://ruslany.net/

    Wednesday, February 13, 2013 5:00 PM
  • Since my yesterday's post I had the chance to try the WebMatrix based approach that AJ explained in the beginning of this thread. So, I can say (with conviction) that slightly modified, this is by far the best approach - better than what Ruslan explains above (tried that as well).

    Here are the pertinent details:

    I started with the Azure hosted WordPress site, which I developed to some point where it became "worthy of something". Being complete novice with WordPress and PHP development, I managed to do something that rendered my site completely useless, so I had to start from scratch. Once I recreated the site from (my) memory, I spent nearly a week searching and experimenting with various WordPress backup plugins and more direct (phpMyAdmin based) approach. 

    My first task was to make a local copy of the Azure hosted site, so I started from here - process very similar to creation of the Azure hosted WordPress.

    Since the Web Platform Installer uses older version of MySQL and that led to some other issues, I advise to first install MySQL Installer 5.6 from http://dev.mysql.com/downloads/mysql/. In the process of this installation, you may also create your own user as MySQL administrator, so you do not use the prebuilt root account. Do not create any databases - that will be done by the Wordpress installation run by Web Platform Installer, that you will run next. 

    Also note that the MySQL installation process will (very likely) fail to add the Firewall rule - this happened to me on Windows 8 workstation, probably because I did not run the MySQL installer as an administrator.

    The Web Platform installer will find that you already have MySQL installed, but will nevertheless try to install the older version of MySQL that it is set to use. Luckily that installation fails, so you just end with WordPress successful installation. There I just used all defaults and did not bother about it's content, since I knew that I will "overwrite it" with my Azure hosted real site.

    The rest was a real breeze, just as AJ described at the beginning of this thread. In no time, I had a copy of my Azure hosted site, on my Windows 8 machine.

    I did not yet try to copy from my machine to Azure though :-)

     

    Nik


    • Edited by Nik Ivancic Wednesday, February 13, 2013 5:33 PM
    Wednesday, February 13, 2013 5:32 PM