Can anyone confirm that phpMyAdmin AllowNoPassword works with MySQL databases?
Solution 1
-
Copy
config.sample.inc.php
toconfig.inc.php
.In most cases you will find the config file
- on linux:
/etc/phpmyadmin/config.inc.php
- on mac:
/Library/WebServer/Documents/phpmyadmin/config.inc.php
- on linux:
-
If you are trying to log in as root, you should have the following lines in your config:
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Solution 2
According to this: https://www.simplified.guide/phpmyadmin/enable-login-without-password
This $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
should be added twice in /etc/phpmyadmin/config.inc.php
if (!empty($dbname)) {
// other configuration options
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
// it should be placed before the following line
$i++;
}
// other configuration options
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Solution 3
I tested the statement:
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
It did not work out for me.
Instead
$cfg['Servers'][$i]['AllowNoPassword'] = true;
worked.
Thanks!
Solution 4
You might have made the same silly mistake that I did, by not removing the // making it a comment.
The line should be like this, but not as a comment.
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Solution 5
Yes not working! I spent whole day with this stupid phpMyAdmin. Just add a new user with a password
1 - Login to mysql or mariadb mysql -u root -p
2 - Run these SQL commands to create a new user with all permissions (or grant your custom permissions)
CREATE USER 'someone'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'someone'@'localhost';
FLUSH PRIVILEGES;
2 - Go to /etc/phpMyAdmin/config.inc.php
and change this:
$cfg['Servers'][$i]['user'] = 'someone';
$cfg['Servers'][$i]['password'] = 'password';
WARNING: This config is for localhost development server only, If you're running a production server you must use strong credentials and not setting user pass in config.inc.php
diggersworld
Updated on December 10, 2021Comments
-
diggersworld over 2 years
I have a version of phpMyAdmin located on my local Apache server.
I am trying to login without a password however phpMyAdmin keeps throwing the warning:
Login without a password is forbidden by configuration (see AllowNoPassword)
However in my config.php file for phpMyAdmin I have set:
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
So I don't know why the message is still appearing.