I have a version of phpMyAdmin located on my local Apache server.
I am trying to lớn 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 tệp tin for phpMyAdmin I have set:
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
So I don't know why the message is still appearing.
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
asked May 6, 2011 at 8:27
diggersworlddiggersworld
13k25 gold badges86 silver badges120 bronze badges
1
- Copy
config.sample.inc.php
to lớnconfig.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
If you are trying to lớn log in as root, you should have the following lines in your config:
$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['AllowNoPassword'] = true;
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered May 6, 2011 at 8:37
user256430user256430
3,6335 gold badges34 silver badges34 bronze badges
5
According to lớn 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;
answered Jan 30, năm ngoái at 3:31
MalinthaMalintha
4215 silver badges13 bronze badges
I tested the statement:
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
It did not work for mạ.
Instead, I had to lớn use the correct name AllowNoPassword
:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Jun 17, năm trước at 18:38
OrionOrion
1391 silver badge10 bronze badges
1
It doesn't work for mạ. Instead, just add a new user with a password
1 - Login to lớn mysql or mariadb mysql -u root -p
2 - Run these SQL commands to lớn 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 lớn /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
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Oct 5, 2019 at 21:41
Mohamed ElbahjaMohamed Elbahja
6391 gold badge8 silver badges9 bronze badges
2
You might have made the same silly mistake that I did, by not removing the // making it a comment.
The line should be lượt thích this, but not as a comment.
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
answered Feb 11, 2013 at 14:30
Pratik BothraPratik Bothra
2,6942 gold badges32 silver badges44 bronze badges
I had a same problem, and I solved my problem.
First go to lớn config.default.php
and change
$cfg['Servers'][$i]['AllowNoPassword'] = false;
to
$cfg['Servers'][$i]['AllowNoPassword'] = true;
answered Mar 25, năm ngoái at 9:48
zheekzheek
7521 gold badge11 silver badges22 bronze badges
I had the same problem. Edit config.inc.php didn't work, similary as reinstall phpmyadmin, apache or mysql. Only way is using password to lớn log in to lớn phpmyadmin.
How to lớn mix password:
- Do everything from below script:
sudo mysql_secure_installation
- Run:
sudo mysql
- Change authentication method of password for root and mix password:
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;
- Run:
mysql> FLUSH PRIVILEGES;
exit
mysql.
Now you can log to lớn phpmyadmin correctly.
answered Dec 9, 2021 at 20:50
Make sure you don't add or uncomment the AllowNoPassword option after the $i++ line.
/* Uncomment the following to lớn enable logging in to lớn passwordless accounts,
* after taking note of the associated security risks. */
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Jul 6, 2013 at 23:35
Nanhe KumarNanhe Kumar
16.3k5 gold badges83 silver badges72 bronze badges
In ubuntu đôi mươi.04
and MYSQL 8.0.x
I had the same problem and I tried to lớn allow PHPMyAdmin not to lớn using passwords.
- So for this you can open the config tệp tin by using this command:
sudo nano /etc/phpmyadmin/config.inc.php
- Then use CTRL+w to lớn find
$cfg['Servers'][$i]['AllowNoPassword']
in PHPMyAdmin`s config file:
/* Uncomment the following to lớn enable logging in to lớn passwordless accounts,
* after taking note of the associated security risks. */
//$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
- Uncomment the line by removing the
//
lượt thích this:
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Use CTRL+o to lớn save the tệp tin and then CTRL+x to lớn exit from the tệp tin.
After that restart the MySQL by this command:
sudo service mysql restart
- Try to lớn access PHPMyAdmin in your local
http://127.0.0.1/phpmyadmin/
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Jul 26, 2021 at 11:09
Just in tệp tin /etc/phpmyadmin/config.inc.php
, uncomment or add the line(if not there),
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
It works just Awesome!
if you have any doubt restart apache.
sudo /etc/init.d/apache2 restart
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Jun 12, năm trước at 10:36
I have the same problem here, then I reinstalled mysql
and it worked.
sudo apt-get install mysql-server mysql-common mysql-client
answered Nov 21, 2013 at 8:55
Aldy syahdeiniAldy syahdeini
3571 gold badge4 silver badges17 bronze badges
After a lot of trials I found the following solution.
This will work if you copied all phpmyadmin files in /var/www
go to lớn your copied location of phpmyadmin thư mục in /var/www
copy the config.sample.inc.php tệp tin as config.inc.php
edit in config.inc.php the following line:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
(In original tệp tin it was false, change it as true and save it.)
Then you will be able to lớn login phpmyadmin without password.
mmohab
2,3734 gold badges27 silver badges43 bronze badges
answered Jun 27, năm trước at 18:56
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
yes the above answer is correct, but it's not secure, you can login root user directlyinto phpMyAdmin
.
If you want to lớn create new user with password and give grant permission, execute the below command in MySQL on terminal, Login into your server on terminal,
# mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user-name'@'%' IDENTIFIED BY 'password' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
zheek
7521 gold badge11 silver badges22 bronze badges
answered Jul 23, năm ngoái at 9:34
LakshmikandanLakshmikandan
4,5994 gold badges30 silver badges38 bronze badges
For mạ I had to lớn mix the auth type to lớn config in addition to lớn the setting the allow no password option in the config.inc.php tệp tin.
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
answered Mar 25, 2021 at 23:46
Others may find, as I did, (working in OS X 10.10.1) that the situation for MAMP PRO (at least in the current release, 3.0.7.3, is different.
All my attempts to lớn apply the remedies suggested here failed. Upon examining the PHP error log I discovered that the index.php that is operating (in /Libary/Application Support/appsolute/MAMP PRO/index.php
-- at line 43, is deciding NOT to lớn go to lớn the config.inc.php
that is discussed here (at /Applications/MAMP/bin/phpMyAdmin/config.inc.php
) but rather to lớn /Library/Application Support/appsolute/MAMP PRO/phpMyAdmin/config.inc.php
.
Furthermore, there is no such tệp tin there (after a 'successful' install of MAMP PRO), so sánh I'm stuck with the error, and furtherfuthermore, every time I try to lớn put the correct tệp tin there, when I restart MAMP PRO, it is not there anymore - something is automatically refreshed to lớn eliminate the config.inc.php
I'm putting there. My workaround for now is to lớn vì thế this in MAMP instead of MAMP PRO.
Fluffeh
33.5k16 gold badges68 silver badges80 bronze badges
answered Jan 4, năm ngoái at 2:37
I had to lớn install MariaDB. I am using OpenSUSE LINUX Leap 15 and had to lớn execute these commands:
sudo zypper update
sudo zypper install mariadb mariadb-client mariadb-tools
sudo systemctl start mysql
sudo systemctl enable mysql //enable tự động start at boot time3
sudo mysql_secure_installation
Source.
answered Oct 18, 2018 at 9:46
BlackBlack
20k45 gold badges183 silver badges292 bronze badges
It works; just thought this would be helpful to lớn someone in the future.
If you are working with MAMP, as a security measure, the $cfg['Servers'][$i]['AllowNoPassword'] = true;
usually will be missing in the config.inc.php
tệp tin so sánh if you want to lớn use phpMyAdmin without a password for root then simply add it preferably after the $cfg['Servers'][$i]['AllowDeny']['rules'] = array();
statement.
Then Restart your server just to lớn be sure and you will be good to lớn go.
answered Nov 6, 2018 at 14:35
TadiwanasheTadiwanashe
1,29414 silver badges15 bronze badges
After lots of struggle I found here you go:
- open thư mục -> xampp
- then open -> phpmyadmin
- finally open -> config.inc
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
- Put SHA256 inside single quotations lượt thích this one
830bbca930d5e417ae4249931838e2c70ca0365044268fa0ede75e33aff677de
$cfg['blowfish_secret'] = '830bbca930d5e417ae4249931838e2c70ca0365044268fa0ede75e33aff677de
';
I found this when I was downloading updated version of phpmyadmin. I wish this solution help you.
answered Feb 10, 2021 at 12:17
My problem was in config.inc.php
changed to lớn
answered Mar 12, 2021 at 3:26
VitalicusVitalicus
1,35415 silver badges18 bronze badges
vim /etc/phpmyadmin/config.inc.php
or
sudo -H gedit /etc/phpmyadmin/config.inc.php
uncomment this below line
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Then, exit and save the tệp tin using the following command,
:wq
answered Apr 14, 2021 at 8:44
Hello I had the same problem and I did not work as discussed in this post and was using the MAMP service, but then I noticed that at the bottom of the local page is the username and password in my case for both was root.
Fedor
20.7k34 gold badges53 silver badges160 bronze badges