Enabling mysql on boot error (Refusing to operate on linked unit file mysql.service)

I'm following instructions on vultr to install LAMP stack on VPS (https://www.vultr.com/docs/how-to-install-apache-mysql-and-php-on-ubuntu-16-04). When trying to enable mysql on boot I'm getting an error.

# sudo systemctl enable mysql.service
Synchronizing state of mysql.service with SysV service script with 
/lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql
Failed to enable unit: Refusing to operate on linked unit file 
mysql.service

I'm a bit new to setting up a VPS so any help would be amazing.


Solution 1:

Try sudo systemctl enable mariadb.service

because mysql.service is a sym link to mariadb.service

Solution 2:

mysql.service may already be partially enabled, try

sudo systemctl disable mysql.service

sudo systemctl enable mysql.service