Why does phpmyadmin give an error when logging in?
# 1698 -Access denied for user 'root' @ 'localhost'... The installation was performed as follows:
sudo tasksel install lamp-server sudo apt-get install phpmyadmin
Password assigned. OC Linux mint. Tried to enter in the console
mysql -u root -pAfter demanded to enter and again gave an error
# 1698 -Access denied for user 'root' @ 'localhost'
Answer # 1
Access denied for user 'root' @ 'localhost'means that the root user with the password you specify does not have access to the DBMS.
Apparently the password was not set or was set incorrectly, or instead of 'root' @ 'localhost' the user 'firstname.lastname@example.org was installed. Try typing in the console
mysql -h 127.0.0.1 -u root -p
If after that you are allowed into the DBMS, you need to create an additional user 'root' @ 'localhost'
GRANT ALL ON *. * TO 'root' @ 'localhost' WITH GRANT OPTION IDENTIFIED BY 'password'
If it doesn't, then you need to restore the root password. Find the configuration file my.cnf and add the directive to the [mysqld] section
skip-grant-tableswhich will disable access rights checking
[mysqld] ... skip-grant-tables
Then restart the server. Now you can login MySQL without password, login and reset password
SET PASSWORD FOR 'root' @ 'localhost'= PASSWORD ('new_password');
After that, remove the directive
skip-grant-tablesfrom my.cnf and restart the server.
Answer # 2
You just need to enter:
and answer questions then we log in:
sudo mysql -h localhost -u root -p
Answer # 3
in newer versions after MySQL 5.7.6, the password change command is slightly different:
ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'new_password';
- php artisan migrate could not find driver
- php : Data from input is not accepted
- php : How to get the required element from the database?
- php : In Laravel, link three tables. Display characteristics and their values for a product
- PHP + MYSQL. The earlier a match is found in a cell, the higher in the result output
- I can not write a json string as an array to the mysql database via php
- php : Secure MySQL database by encryption?
- php : Laravel DB values output
- php : I can't add the required entry to the database