Search This Blog
Popular Posts
-
Elegant Themes has been developing WordPress themes for a long time. It has developed lots of popular themes including Divi, Nexus, Fa...
-
Flickr/Laura D'Alessandro See Also I took Harvard Business School's new pre-MBA course online — and it is definitely w...
-
Hello there! My blog post 'Spikes' was published on Sept. 22nd; however, the post before it called 'Flow' was published on...
-
Hi there! There isn't a true e-commerce solution here at WordPress.com. You can, however get a PayPal button. If you get a PayPal bu...
-
Good news for the secure web: WordPress will now encrypt the traffic for over a million more websites that are hosted on its servers. Wo...
-
I will publish an article only when I have something important to say. That's what I reminded myself every time the egocentric ...
-
How to start a blog or website in 5 minutes with WordPress. After publishing the post on how I started blogging full-time, I'v...
-
KOZHIKODE: E A Jabbar, a retired teacher and an activist of Malappuram based Yukthi vadi Sangham, has filed a complaint before chief minis...
-
At the ripe young age of 32, back in 2009, Uber CEO Travis Kalanick apparently launched a Wordpress blog called Swooshing, and for some ...
-
The WordPress project released today version 4.5.2 of the WordPress open-source platform that contains two security issues in two librarie...
Blog Archive
- December (18)
- November (29)
- October (27)
- September (29)
- August (31)
- July (30)
- June (29)
- May (29)
- April (30)
- March (31)
- February (28)
- January (31)
- December (31)
- November (30)
- October (31)
- September (30)
- August (43)
- July (42)
- June (33)
- May (43)
- April (36)
- March (37)
- February (31)
- January (4)
- December (1)
- November (1)
- October (24)
- September (24)
- August (25)
- July (28)
- June (18)
- September (1)
Total Pageviews
Blogroll
Use MySQL server on an Azure VM
Here is an option that you can host MySQL server on an Azure VM, connect your PHP sites such as WordPress, Joomla, OpenCart, etc. to the database hosted on the server.
1. Create MySQL server on Azure VM (published by Bitnami) from Marketplace:

If you already have a web site on Azure, you can use the same resource group and select the same location.

When you select VM, D-series is faster than A-series, with a little more cost. For more detail, refer to https://azure.microsoft.com/en-us/pricing/details/virtual-machines/
After the VM is deployed, it is ready to use. You can make the IP of the VM to static, and the IP won't change in the case you need to reboot the VM

2. Migrated MySQL database to the new database, you can do it from MySQL client tool, such as PHPMyAdmin, MySQL Wordkbench, or copy sql dump to the VM, import from command line, e.g.
mysql -u <user> -p<password> <dbname> < sqlfile.sql
3. If you need to use MySQL client tool such as PHPMyAdmin to connect to the database, modify connectionString from application setting, e.g.
Database=<database name>;Data Source=<IP of the VM hosting MySQL server>;User Id=<database user name>;Password=<database user password>
4. Change database connection configuration in your web site to connect to the database hosted on the VM, for example, in WordPress change it in wp-config.php, for Joomla site, modify the database info in configuration.php, and so on.
5. If you have existing backup schedule using database on ClearDB , you will need to disable database backup, let the backup perform on web site only. You will need to create an entry for database backup in crontab (contab -e) on the VM that hosting MySQL server, for example, you want the database backup database "produtiondb" start at 11:30 PM daily
30 23 * * * date=`date -I`; /opt/bitnami/mysql/bin/mysqldump -u<database user name> -p<database user password> produtiondb > /home/dbbackup/produtiondb_$date.sql
You can also schedule a job to purge older database backup, e.g.
45 23 * * * date=`date –date="n days ago" -I`; rm /home/dbbackup/produtiondb_$date.sql
Back to topSource: Use MySQL server on an Azure VM
0 comments:
Post a Comment