Can not login to phpmyadmin with root user

…衆ロ難τιáo~ 提交于 2019-12-08 23:08:33

I sloved it with below steps:

1) Open config.inc.php file

2) Change file permition to write

sudo chmod 777 /etc/phpmyadmin/config.inc.php

3) Add below line to the file

 $cfg['Servers'][$i]['user'] = 'root';
 $cfg['Servers'][$i]['password'] = 'MY_SQL ROOT_USER_PASSWORD';
 $cfg['Servers'][$i]['AllowNoPassword'] = true;

4) Change file parmissions to original again

 sudo chmod 755 /etc/phpmyadmin/config.inc.php

5) Restart server

service mysql start or service mysql start

6) open

http://localhost/phpmyadmin
username: root
password: YOUR_MYSQL'S ROOT USER'S PASSWORD
  • Successfully logged in to phpmyadmin.
BISHAL SHAW

in terminal, type

sudo gedit '/etc/phpmyadmin/config-db.php'

The user file will get open Just check the username like

$dbuser='phpmyadmin';

And password like

$dbpass='1234';

Just copy this username and password without quotes in login page.

This is the correct answer:

sudo dpkg-reconfigure -plow phpmyadmin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!