Answers for "mysql access denied for user 'root'@'localhost' in mac"

SQL
8

mysql access denied for user 'root'@'localhost'

sudo mysql

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
Posted by: Guest on January-02-2021
2

Got error: 1698: Access denied for user 'root'@'localhost' when trying to connect

$ sudo mysql -u root # I had to use "sudo" since is new installation

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

$ service mysql restart
Posted by: Guest on August-18-2020

Code answers related to "mysql access denied for user 'root'@'localhost' in mac"

Code answers related to "SQL"

Browse Popular Code Answers by Language