Answers for "mysql sqlstate[hy000] [1698] access denied for user 'root'@'localhost' (sql: select * from `users` where `email` = [email protected] limit 1)"

SQL
10

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

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

Code answers related to "mysql sqlstate[hy000] [1698] access denied for user 'root'@'localhost' (sql: select * from `users` where `email` = [email protected] limit 1)"

Code answers related to "SQL"

Browse Popular Code Answers by Language