Answer the question
In order to leave comments, you need to log in
Why can't login as MySQL root user in PHPMyAdmin?
Hello! For some reason I can't login as MySQL root user through phpMyAdmin.
Through the console I checked, I enter absolutely fine. Gives error #1698 - Access denied for user 'root'@'localhost' Unable
to log in as other users. What could be the reason?
Answer the question
In order to leave comments, you need to log in
MySQL 5.7 has changed the security model: now logging into MySQL as root requires sudo
https://www.ussr.kiev.ua/ru/1698-Access-denied-for-user
1. root passwords must be set
2. $cfg['Servers'][$i]['AllowRoot'] must not be false
Solution:
mysql -u root -p
use mysql;
update user set plugin='' where User='root';
flush privileges;
exit;
systemctl start mariadb
systemctl start mysql
A proven working option, I think it will help:
By default, root login is prohibited. I advise you to create a separate user for your needs:
(enter one line at a time)
sudo mysql -u root -p (will ask for a password)
create user 'user'@localhost identified by 'password';
grant all privileges on *.* to 'user'@localhost;
grant grant option on *.* to 'user'@localhost;
flush privileges;
stop;
How to login as root in phpmyadmin?
Perhaps in the fact that acc. there is no entry permitting entry in the database. You can try to run the mysql-client from under the root (in the console). This approach works with MariaDB, it might work with MySQL too.
And then see who can log in from which host. Base: mysql , table: user . Example .
Indeed, how to log in as root without a password has already been sucked up many times and this can be easily found on the Internet.
This is a limitation in the config.
https://mariadb.org/authentication-in-mariadb-10-4/
why this is done is described in this article
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question