Score:0

(Ubuntu server 20.04) MySQL DB failing to reinstall

cn flag
Ric

I tried to make a login system but inexperienced in servers and backend as I am, I followed two tutorials with different login credentials for the DB and now I've locked myself out. The first password for root@localhost didn't work. My simpliest solution was to uninstall the DB as it wasn't in use yet and didn't have any connections (I believe). When I was to reinstall it, parts of the package were lost and it failed to fetch stuff from ubuntu archives. I think I screwed up, but is it that hard to install a DB? If I need to wipe it all over again I can do that, there are three files in use now which are easily replacable. So, what do you recommend?

vidarlo avatar
om flag
We need more information. What commands did you run? How did you attempt to install it? What error messages did you get? [Edit] your question to add as much information as possible.
in flag
It’s not hard after doing it a hundred times, but starting from zero often has a very steep learning curve. After uninstalling MySQL, be sure to delete the `/var/lib/mysql` directory as well, otherwise reinstallation will just pick up the existing database files and use them again.
Ric avatar
cn flag
Ric
@matigo So do you think I should delete the MySQL service once again and make sure everything is gone before reinstalling?
in flag
That would most likely be the simplest way forward, yes. Clear out MySQL completely, then perform the 3-step install to get the database engine back on your machine.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.