I've just installed Ubuntu 20.04 and messed something up with MySQL. I don't know how to login:
$ mysql -u root -p Enter password: ERROR 1698 (28000): Access denied for user 'root'@'localhost'
I don't have any data in there, so I don't care if the DB is lost. In fact, I would prefer a clean solution.
What I tried
$ sudo dpkg-reconfigure mysql-server-8.0 mysqld will log errors to /var/log/mysql/error.log mysqld is running as pid 7577
Finishes without an error message, but I don't see any way to enter a new password.
I tried this, but
$ sudo mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) $ ls -alh /var/run/mysqld/ total 0 drwxr-xr-x 2 mysql root 40 Mai 17 11:08 . drwxr-xr-x 38 root root 1,1K Mai 17 11:08 ..
I guess this might be an issue? What should I do?
I followed this guide to completely re-install mysql, but I run into the same issues.