DB is one way. The other to try might be simpler if one is un-comfortable concerning MySQL queries.
Place the following line in your config.php file:
Be sure to include the ';' at the end of that line.
No need to restart anything, just access the site using http and see if you can login.
CFG lines in the config.php file override DB settings for site, so when you figure out what went wrong and attempt to do it again, just comment out that line by adding a // at the beginning of that line.
'spirit of sharing', Ken