Pipeline Setup: MySQL
Last updated
Last updated
Time Required: 10 minutes (Setup: 5 minutes; Data relocation: 5 minutes)
DigitalOcean provides an excellent as well as a ready-made MySQL instance image. We're going to use follow the guide, using the template image we created in Part 4 and prepared in .
Follow the guide exactly and do not skip any steps.
One of the selections during the mysql secure installation script is an option to disable remote root logins to ensure that no-one can guess at the root password from the network. This is a good idea, but we'll want to block anyone not on our network (whether a VPN, a work subnet, or just within our provider's network, e.g. other droplets) from connecting at all. If we can do that, allowing remote root mysql logins is less bad.
Once you've completed the basic setup guide, be sure to continue to the instructions on so we can take advantage of block storage. Just remember to use the mount point you named in Instance Prep: The guide uses /mnt/db, so if you did the same then you'd use that instead of the example in DigitalOcean's guide of /mnt/volume-nyc-01.
Most of our access control will come from the provider-level firewall rather than UFW, so for now we'll just open MySQL's default port 3306 on UFW and deal with the bulk of the firewall rules in the next section.
Once you've verified that you can connect to your database instance with your preferred MySQL client, we'll continue with access control in the next section: .