PhpMyAdmin (on ubuntu lamp): Login without a password is forbidden by configuration (see AllowNoPassword)
772
My mysql password = '' i try to login to PhpMyAdmin (on Ubuntu 10.04 lamp) and get error:
Login without a password is forbidden by configuration (see AllowNoPassword)
What should i do for enter to phpMyAdmin without set password?
Thanks
Here is what I have noticed from attempting to solve this problem.
what I went through:
I set $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
I go to phpmyadmin and login fine without password ..No problem
Then I wanted to run apache with a different user than www-data so I
I go to /etc/apache2/eenvvars and I edit export
APACHE_RUN_USER=myuser and export APACHE_RUN_GROUP=myuser
I restart apache2 and when I try to login to phpmyadmin without password it does not let me event though, as I previously mentioned, I set $cfg['Servers'][$i]['AllowNoPassword'] = TRUE.
To resolve it
I go to /etc/phpmyadmin/
check the permission (run ls-l)
I notice that it is root:www-data for config-db.php and for config.inc.php
I run sudo chown root:myuser
Restart apache
Then go to phpmyadmin and login with passowrd...It works
If you run apache with a different other than www-data (i.e you own) and your config.inc.php and config-db.php are owned by www-data, then phpmyadmin will not
sudo nano /etc/phpmyadmin/config.inc.php
/* Uncomment the following to enable logging in to passwordless accounts,
* after taking note of the associated security risks. */
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
You can turn on the option AllowNoPassword on file /etc/phpmyadmin/config.inc.php.
Edit the file config.inc.php, search and uncomment this line:
// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Then you can access PhpMyAdmin without password.
Here is what I have noticed from attempting to solve this problem. what I went through:
Then I wanted to run apache with a different user than www-data so I
I restart apache2 and when I try to login to phpmyadmin without password it does not let me event though, as I previously mentioned, I set $cfg['Servers'][$i]['AllowNoPassword'] = TRUE.
To resolve it
If you run apache with a different other than www-data (i.e you own) and your config.inc.php and config-db.php are owned by www-data, then phpmyadmin will not
use Sudo to access the following file that mention above (etc/phpmyadmin/config.inc.php.) and also stop apcaha before editing this file with this
else it will wont allow you to update it. Command for stopping apcahe
hope it will help it works for me
Open
phpmyadmin
config file