Home php PHPMYAdmin error: Access Denied for User

PHPMYAdmin error: Access Denied for User

Author

Date

Category

Why in phpmyAdmin when entering the error # 1698 - Access Denied for User 'root' @ 'Localhost' . Installation performed as follows:

sudo tasksel install lamp-server
Sudo Apt-Get Install PhpmyAdmin

Password appointed. OC Linux Mint. I tried to enter in the console MySQL -U root -p after demanded to enter and again issued an error # 1698 - Access Denied for User 'root' @ 'Localhost'


Answer 1, Authority 100%

Error Access Denied for User 'root' @ 'localhost' means that the Root user with the password you specifies do not have access rights to the DBMS.

Apparently the password was not installed or installed not correctly, or the user ‘root’@127.0.0.1 was installed instead of’ root ‘@’ localhost ‘. Try to dial

console

mysql -h 127.0.0.1 -u root -p

If after that it will be stopped in the DBMS, you need to create an additional user ‘root’ @ ‘Localhost’

grant all on *. * to 'root' @ 'Localhost'
With GRANT Option
IDENTFIED by 'password'

If it does not allow, it means you need to restore the password for root. Find the MY.CNF configuration file and add SKIP-GRANT-TABLES to the [MySQLD] section, which will disable the check of access rights

[mysqld]
...
SKIP-GRANT-TABLES

After that restart the server. Now you can enter MySQL without a password, log in and reinstall the password

set password for 'root' @ 'Localhost' = Password ('new_password');

After that, you should remove the Skip-Grant-Tables directive from my.cnf and restart the server.


Answer 2, Authority 18%

In new versions after MYSQL 5.7.6 The password change command is somewhat different:

alter user 'root' @ 'localhost' identified by 'new_password';

Answer 3

just need to enter:

sudo mysql_secure_installation

and answer questions
Next login:

sudo mysql -h localhost -u root -p

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions