I was working on my Wordpress site (hosted on DigitalOcean) using the ip address as the website address. I decided to change the address to my domain name so I went into settings and updated the address then pressed save. Then when I went to the domain name I was greeted with a 404. Going to the ip address redirected me to the domain name.
I tried adding lines in wp-config.php and functions.php with the new domain, but nothing changed when I tried accessing the site again. I tried to access the db through phpmyadmin but I got an error: mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES). Then I tried accessing the database via the console and while I could authenticate with the wordpress username and password, access was denied for all sql statements.
I would revert to my backup, but it was made 4 days ago and I had some significant edits since then.