I set up a Digital Ocean droplet (server) a few days ago and need to access mysql. No password for root is working amongst what I've tried. However this command:
service mysql[d] stop
Doesn't work. Apparently I am supposed to issue this command:
sudo systemctl stop mariadb.service
But that results in
Failed to stop mariadb.service: Unit mariadb.service not loaded.
Furthermore, this command
mysqld_safe --skip-grant-tables --skip-networking & mysql -u root
Results in these responses:
sudo: mysqld_safe: command not found ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) + Exit 1 sudo mysqld_safe --skip-grant-tables --skip-networking
I am logged into the server as root; what do I do from here?