Answers for "SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'"

SQL
12

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

>>> sudo mysql -u root -p

>>> USE mysql;

>>> UPDATE user SET plugin='mysql_native_password' WHERE User ='root';

>>> FLUSH PRIVILEGES;

>>> exit;

>>> service mysql restart;
Posted by: Guest on July-09-2020
2

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

$ 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
1

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

//Just use sudo in command!
sudo mysql -u root -p
Posted by: Guest on November-11-2021
1

IlluminateDatabaseQueryException : SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

$ sudo mysql -u root -p
Now you can add a new MySQL user with the username of your choice.

mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
And finally grant superuser privileges to the user you just created.

mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

after that go and edit .env DB_USERNAME=newuser
DB_PASSWORD=password
Posted by: Guest on December-18-2020
0

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

SET PASSWORD FOR 'bob'@localhost = PASSWORD("");
Posted by: Guest on June-09-2021

Code answers related to "SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'"

Code answers related to "SQL"

Browse Popular Code Answers by Language