Add MySQL to Nginx Ubuntu VM on Azure
The next step on my way to run WordPress on an Azure Ubuntu VM with Nginx, is to install MySQL. This is not that complicated, so lets just jump right into it.
- Install and Setup Nginx on Azure with a Ubuntu VM
- PHP with Configuration
- Setup WordPress
- Configure Nginx and WordPress
Please be aware that the steps I describe in this article may cost you money. Please see the Azure pricing page first.
Like mentioned in the last post, we want to stay up to date, so first up- and upgrade.
$ sudo apt-get update $ sudo apt-get upgrade -y
$ sudo apt-get install mysql-server -y
While installing, you will be asked to enter a password for your MySQL root account, just enter a password here, you can change it later on.
MySQL Security Settings:
After the installation we want to configure some things, regarding the MySQL security. To do so, just enter the following command:
$ sudo mysql_secure_installation
First you will be prompted for the root password you entered before. Hit Y only if you want to change the root password.
Next, the process will ask you a few more questions, just answer those with Y.
- Remove anonymous user accounts
- Remove remote root login
- Remove the testing DB
- Reload privilege tables
That is basically it. Next we want to install WordPress!