NEW DATABASE SERVER

After testing an upgrade we deployed a new virtual machine with Azure with Ubuntu 18.04 for our database. The old A0 VM is actually costs a few pesos more than the new B1s VM which makes this new platform more cost effective. The CPU load for the blade server is reduced considerably  as well which reduces costs for Azure.

SSD prices have fallen and capacities are much larger so cloud services are migrating to SSD for virtual machines and hard disks for content delivery setups.

We have 64GB for the database which affords a specular amount of storage. This provides enough storage for millions of posts on a WP site. Azure has as much as 4TB available for the SSD VM which is serious overkill for our needs.

Azure is definitely working hard to make it possible even for a small shop to have a solid presence on the internet.

One the Azure portal we opened ports 20-21 for FTP and 22 for Telenet to enter the server. Port 3306 is used by the database.

SETUP

sudo apt-get install mysql-server

Once the database is installed all that is needed is to edit the config file.

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

We had to change bind-address = 127.0.0.1 to 0.0.0.0 so our sites would connect, fixed

if needed you can set the database password, on a clean install here is no password so setting one is very important for a cloud appliance

mysql -uroot
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
flush privileges;
quit;

the restart the database

sudo service mysql restart

and we are live.

now lets restore the dump from the old server..

sudo mysql -uroot -p < backup.sql

enter the password for the root account, you will get a warning if you use the password on the command line

sudo reboot

makes sure the system is ready and all resources are flushed and ready to go.

then you can edit the wp-config.php for all wordpress sites and simply change the server, and once the changes are done the old VM can be deleted