Can anyone confirm that phpMyAdmin AllowNoPassword works with MySQL databases? (ook)
https://stackoverflow.com/questions/5908752/can-anyone-confirm-that-phpmyadmin-allownopassword-works-with-mysql-databases
Last updated
https://stackoverflow.com/questions/5908752/can-anyone-confirm-that-phpmyadmin-allownopassword-works-with-mysql-databases
Last updated
Ask QuestionAsked 11 years, 3 months agoModified 8 months agoViewed 185k timesReport this ad6720
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:
So I don't know why the message is still appearing.
phpmysqlapachepasswordsphpmyadminShareFollowedited Sep 11, 2018 at 9:55AymDev5,41433 gold badges2828 silver badges4747 bronze badgesasked May 6, 2011 at 8:27diggersworld12.4k2222 gold badges8080 silver badges118118 bronze badges
Checks if mysql is running, D'oh! – Timo Huovinen Jun 22, 2013 at 17:38
This works for me immediatley in CentOS 7, but not CentOS 6. Can't figure it out :(. PS: It would be nice if we knew the OS you were on!, but its a little late lol – FreeSoftwareServers Jan 8, 2017 at 2:13
Sorted by:Trending sort available Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 135
Copy config.sample.inc.php
to config.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 log in as root, you should have the following lines in your config:
$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['AllowNoPassword'] = true;
2In CentOS 7: /etc/phpMyAdmin/config.inc.php
– James Graham Nov 26, 2014 at 16:19
7this should be added in two places according to this: docs.oseems.com/general/web/phpmyadmin/… and it should be $cfg['Servers'][$i]['AllowNoPassword'] = true; NOT $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; – Malintha Jan 30, 2015 at 3:23
I'm going to check the obvious first and ask if you remembered to copy your config.sample.inc to config.inc. ??? Why to make config.php ? There is alread config,inc.php – Pratik Feb 15, 2015 at 7:41
Works for me... Thanks :) – Robin Hood Mar 9, 2016 at 16:51
nothing worked for me then i followed this document and changed password of root. digitalocean.com/community/tutorials/… – Pontus Carme Apr 7, 2019 at 14:32
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
I tested the statement:
It did not work out for me.
Instead
worked.
Thanks!
1error clearly states AllowNoPassword
needs to be true
not AllowNoPasswordRoot
. but documentation doesn't mention this. setting AllowNoPassword
to true
works indeed. – vknyvz Nov 6, 2015 at 21:03
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)
2 - Go to /etc/phpMyAdmin/config.inc.php
and change this:
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
thanks but the first part is sufficent , why the second part? – Ahmed C Jul 19, 2020 at 19:04
if you're on localhost and want to save some time, but it's not working either these days, I 've deleted the outdated phpMyAdmin... now I'm using DBeaver instead. – Mohamed Elbahja Jul 19, 2020 at 23:26
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.
Make sure you don't add or uncomment the AllowNoPassword option after the $i++ line.
/* Uncomment the following to enable logging in to passwordless accounts, * after taking note of the associated security risks. */
Just in file /etc/phpmyadmin/config.inc.php
, uncomment or add the line(if not there),
It works just Awesome!
if you have any doubt restart apache.
Cheers!!!
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 log in to phpmyadmin.
How to set password:
Do everything from below script:
sudo mysql_secure_installation
Run:
sudo mysql
Change authentication method of password for root and set password:
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;
Run:
mysql> FLUSH PRIVILEGES;
exit
mysql.
Now you can log to phpmyadmin correctly.
I have the same problem here, then I reinstalled mysql
and it worked.
I had a same problem, and I solved my problem.
First go to config.default.php
and change
to
where is config.default.php? – phil294 Aug 4, 2016 at 11:10
login without a password is forbidden by configuration (see allownopassword)
In ubuntu 20.04
and MYSQL 8.0.x
I had the same problem and I tried to allow PHPMyAdmin not to using passwords.
So for this you can open the config file by using this command:
Then use CTRL+w to find $cfg['Servers'][$i]['AllowNoPassword']
in PHPMyAdmin`s config file:
Uncomment the line by removing the //
like this:
Use CTRL+o to save the file and then CTRL+x to exit from the file.
After that restart the MySQL by this command:
Try to access PHPMyAdmin in your local http://127.0.0.1/phpmyadmin/
After a lot of trials I found the following solution.
This will work if you copied all phpmyadmin files in /var/www
go to your copied location of phpmyadmin folder in /var/www
edit in config.inc.php the following line:
(In original file it was false, change it as true and save it.)
Then you will be able to login phpmyadmin without password.
Not worked for me. Thanks – Kamlesh Feb 25 at 17:51
yes the above answer is correct, but it's not secure, you can login root user directlyinto phpMyAdmin
.
If you want to create new user with password and give grant permission, execute the below command in MySQL on terminal, Login into your server on terminal,
For me I had to set the auth type to config in addition to the setting the allow no password option in the config.inc.php file.
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 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 go to the config.inc.php
that is discussed here (at /Applications/MAMP/bin/phpMyAdmin/config.inc.php
) but rather to /Library/Application Support/appsolute/MAMP PRO/phpMyAdmin/config.inc.php
.
Furthermore, there is no such file there (after a 'successful' install of MAMP PRO), so I'm stuck with the error, and furtherfuthermore, every time I try to put the correct file there, when I restart MAMP PRO, it is not there anymore - something is automatically refreshed to eliminate the config.inc.php
I'm putting there. My workaround for now is to do this in MAMP instead of MAMP PRO.
I had to install MariaDB. I am using OpenSUSE LINUX Leap 15 and had to execute these commands:
It works; just thought this would be helpful to 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
file so if you want to 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 be sure and you will be good to go.
After lots of struggle I found here you go:
open folder -> xampp
then open -> phpmyadmin
finally open -> config.inc
Put SHA256 inside single quotations like this one
830bbca930d5e417ae4249931838e2c70ca0365044268fa0ede75e33aff677de
ShareFollowedited Oct 17, 2019 at 16:34user3589620answered May 6, 2011 at 8:37DondeEstaMiCulo3,43144 gold badges3131 silver badges3232 bronze badges
ShareFollowedited May 17, 2019 at 6:32Mohd Shakir Zakaria66488 silver badges2020 bronze badgesanswered Jan 30, 2015 at 3:31Malintha40955 silver badges1212 bronze badgesAdd a comment7
ShareFollowedited Jun 17, 2014 at 19:04Alex VII93066 silver badges2525 bronze badgesanswered Jun 17, 2014 at 18:38Orion11511 silver badge99 bronze badges
ShareFollowedited Oct 7, 2019 at 21:31answered Oct 5, 2019 at 21:41Mohamed Elbahja59111 gold badge99 silver badges99 bronze badges
ShareFollowanswered Feb 11, 2013 at 14:30Pratik Bothra2,57222 gold badges2828 silver badges4343 bronze badgesAdd a comment3
ShareFollowanswered Jul 6, 2013 at 23:35Nanhe Kumar14.5k33 gold badges7575 silver badges6666 bronze badgesAdd a comment3
ShareFollowanswered Jun 12, 2014 at 10:36Manish Shrivastava28.7k1313 gold badges9595 silver badges101101 bronze badgesAdd a comment3
ShareFollowanswered Dec 9, 2021 at 20:50bam_krol3133 bronze badgesAdd a comment2
ShareFollowedited Nov 21, 2013 at 9:17Adrian Thompson Phillips6,58566 gold badges3535 silver badges6363 bronze badgesanswered Nov 21, 2013 at 8:55Aldy syahdeini32911 gold badge44 silver badges1616 bronze badgesAdd a comment2
ShareFollowedited Jul 19, 2018 at 8:56Krunal Sonparate1,08299 silver badges2626 bronze badgesanswered Mar 25, 2015 at 9:48zheek74211 gold badge1111 silver badges2222 bronze badges
ShareFollowanswered Jul 26, 2021 at 11:09Pejman Kheyri2,80877 gold badges3030 silver badges3131 bronze badgesAdd a comment1
ShareFollowedited Jun 27, 2014 at 19:24mmohab2,20344 gold badges2727 silver badges4141 bronze badgesanswered Jun 27, 2014 at 18:56ismail1111 bronze badge
ShareFollowedited Jan 25, 2016 at 16:20zheek74211 gold badge1111 silver badges2222 bronze badgesanswered Jul 23, 2015 at 9:34Lakshmikandan3,98522 gold badges2727 silver badges3535 bronze badgesAdd a comment1
ShareFollowanswered Mar 25, 2021 at 23:46Joshua Graham19844 bronze badgesAdd a comment0
ShareFollowedited Jan 4, 2015 at 2:59Fluffeh32.8k1616 gold badges6666 silver badges8080 bronze badgesanswered Jan 4, 2015 at 2:37DonColonie1Add a comment0
ShareFollowanswered Oct 18, 2018 at 9:46Black15.8k3333 gold badges142142 silver badges240240 bronze badgesAdd a comment0
ShareFollowanswered Nov 6, 2018 at 14:35Tadiwanashe1,0181313 silver badges1515 bronze badgesAdd a comment0
ShareFollowanswered Feb 10, 2021 at 12:17Hanifullah Jamalzai7111 gold badge22 silver badges99 bronze badgesAdd a comment