0

I am having a lot of problems with mysql server. First, I couldn't log into the database, couldn't log in as root. When I ran mysql_secure_installation, it seemed to accept the password reset but still wouldn't log me in. I ran mysqld_safe --skip-grant-tables and then manually reset the password, but this just prevented me from restarting mysql. the second time I couldn't even log in this way.

I've tried reconfiguring dpkg. I've purged all mysql* packages. At some point, this process even broke the mysql-server package, and I couldn't reinstall mysql-server. However, the installation never prompted me to set a root password, and I thought it normally did this.

Eventually, I got it installed again, somehow. But now MySQL won't start. I didn't have any schemas or tables I need in mysql, so I could just go scorched-earth in removing it.

There has to be a way for me to start over with a fresh mysql installation, set my password, and log in normally. However, I don't know how to do this.

6
  • I see no release details, and it seems you've mostly just logged what happened without specifics (no commands & messages, eg. it won't start without details on how started and/or any messages), and no clear question. It's better if we're not making assumptions...
    – guiverc
    Jun 20, 2020 at 6:01
  • 1
    Does this answer your question? How do I uninstall MySQL? and How do I uninstall MySQL completely?
    – Kulfy
    Jun 20, 2020 at 6:10
  • I received all kinds of errors along the way, but here are the ones I'm getting now; /etc/mysql/debian-start[5983]: /usr/bin/mysql_upgrade: the '--basedir' option is Looking for 'mysql' as: /usr/bin/mysql Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck Version check failed. Got the following error when calling the 'mysql' command line client ERROR 1045 (28000): Access denied for user 'root' FATAL ERROR: Upgrade failed
    – 3x5
    Jun 20, 2020 at 12:01
  • 1
    Please edit your question to add error messages. Formatting in comments make reading outputs difficult. Thanks.
    – Kulfy
    Jun 20, 2020 at 13:09
  • I wasn't able to, and now I can't edit my comment.
    – 3x5
    Jun 22, 2020 at 21:56

0

Browse other questions tagged or ask your own question.