Last active
February 15, 2021 12:30
-
-
Save vininjr/375241442bf3ccd8761a51280d23438f to your computer and use it in GitHub Desktop.
Error 1628: Acess denied for user 'root'@'localhost' (Install mysql)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ERROR 1698 (28000): Access denied for user 'root'@'localhost', change password mysql. | |
$ sudo mysql -u root # I had to use "sudo" since is new installation | |
mysql> USE mysql; | |
mysql> SELECT User, Host, plugin FROM mysql.user; | |
+------------------+-----------------------+ | |
| User | plugin | | |
+------------------+-----------------------+ | |
| root | auth_socket | | |
| mysql.sys | mysql_native_password | | |
| debian-sys-maint | mysql_native_password | | |
+------------------+-----------------------+ | |
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root'; | |
mysql> FLUSH PRIVILEGES; | |
mysql> exit; | |
$ service mysql restart | |
$ sudo mysql -u root # I had to use "sudo" since is new installation | |
mysql> USE mysql; | |
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new-password'; | |
mysql> FLUSH PRIVILEGES; | |
mysql> exit; | |
$ service mysql restart | |
## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
root pass: *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B