Okay, so I think I fixed it myself. I finally got access to a computer and the first thing I did was check the wp-config file. Everything looked okay, password was the correct one and user, etc. But then I noticed that for some reason, a hostname for mysql was never created when I used wordpress installer, so i created one with the same name as it said in my wp-config file, and now it works again
Hopefully this was all it took, and I’m crossing my fingers that it won’t happen again.