Initial MYSQL Error - Denied Access

ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: N )

I tried EVERYTHING, I read the answer pages, and nobody seems to know the right one.

When I try to enter my DB, I just get the above error, I cannot set a password or anything else.

It is impossible to enter MySQL now, I do not understand.

Thanks for your help in advance.

+3
source share
3 answers

use the -p option. (Tells mysql that you want to provide a password at login.)

 $ mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) $ mysql -u root -p Enter password: 

If this does not work, try B.5.4.1. Like Reset Root Password from the MySQL Reference Guide.

+3
source
 $ mysql -u root -p{you_password} {db_name} 

just remove the '{}' from the line.

0
source

In service.msc, check if mysql is running as a local system or network system. By default, it should be a network system, change it to the local system, and restart the service.

0
source

Source: https://habr.com/ru/post/1346659/


All Articles