I set up my first Ubuntu Server with Ubuntu 16.04, nginx, php7.0, MariaDB, nextcloud and external DynDNS using this tutorial here: Install Nextcloud 9 on Ubuntu 16.04
The solution for me was to run the following:
sudo killall mysqld
If you are still experiencing this issue, run the command ps -aux | grep 'mysql'. if anything shows up, just kill it as well.
ps -aux | grep 'mysql'
Finally run:
sudo systemctl restart mysql.service