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;
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;
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
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
//Just use sudo in command!
sudo mysql -u root -p
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
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
SET PASSWORD FOR 'bob'@localhost = PASSWORD("");
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us