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%
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
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';
just need to enter:
and answer questions
sudo mysql -h localhost -u root -p