- #1
- 2,039
- 2,294
I wanted to install MySQL on my laptop running Ubuntu 20.04, and was following this website for instructions. I executed the following commands:
After installation, I found that I could log into
Since then, I cannot log into the
I thought a re-installation would help. So I uninstalled it using the following commands:
Then I again installed it, but when I try to execute
I tried entering no password, and got the same message as above, with the "YES" changed to "NO".
So, I cannot proceed with the installation.
Tried restarting the system so that temporary files are deleted, but no avail.
All help is appreciated.
Code:
~$ sudo apt update
~$ sudo apt install mysql-server
~$ sudo mysql_secure_installation
root
user without using any password. This felt a little unsafe, so following this answer on askubuntu.com, I changed the authorization plugin such that I am requested a password every time I type mysql -u root -p
.Since then, I cannot log into the
root
user any more. I am sure that I am entering the correct password, but it just doesn't let me in, and shows this error message:
Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Code:
~$ sudo apt remove mysql-server
~$ sudo apt autoremove
sudo mysql_secure_installation
, I am asked for a password. Weird, there should be no password set because this is a fresh installation. I tried entering the previous password, and got this error:
Bash:
~$ sudo mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost' (using password: YES)
So, I cannot proceed with the installation.
Tried restarting the system so that temporary files are deleted, but no avail.
All help is appreciated.