'Logon without a password is forbidden by configuration '

Hi.
Background, I installed AMP: apache, mySQL and phpMyAdmin on my Macbookpro.
I did Not move any files into different directories.
It was working fine. PhpMyAdmin would automatically launch as localhost.
Sorry this is long but I tried very hard to provide all information in this initial post.
People who really know php will more likely than not spot the problem quickly.
I did a fair amount of research and trouble shooting.
I am somehow missing a couple of pieces of the puzzle conceptually.

Initially I logged in like this.

Username: root Password: root

Issue:
I made a change which is giving me this error. ‘Logon without a password is forbidden by configuration (see AllowNoPassword).’
See **** below for the exact steps that lead to this log in problem.

QUESTIONS.
I would appreciated clarification about the connections between phpMyAdmin and MySQL and their passwords.
I would appreciated clarification of the file names and their relevance and also the locations of these configuration files.
See** below for my paths

From this forum, it seems that I should be editing my config.inc.php file to reflect this code:
Find the line

$cfg['Servers'][$i]['password']='';

and change this to

$cfg['Servers'][$i]['password']='NO';

I did this. This did not work.

I continued troubleshooting using help from documentation and forums and tried all of the below,
Restarting apachectl each time Sudo apachectl restart
and clearing browser cookies each time.

$cfg['Servers'][$i]['Password'] = 'root'; $cfg['Servers'][$i]['password'] = ''; I added this code: $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; $cfg['Servers'][$i]['AllowNoPassword'] = true;

I ; Uncommented each line individually.
I Changed to: ‘= false;’

I am still getting the error.

**
The path to my config.inc.php is:
Downloads/config.inc.php
Note. During one of the early on php tutorials, we actually created a filed called config.inc.php.
I did not realize until trouble shooting that this file - which did Not have config.inc.php standard code inside, may have caused a conflict. I renamed this file when troubleshooting. I do not know if this may be a problem and maybe it has to do with my config.inc.php file being in my ‘downloads’ directory. This does not seem right to me.


Further information about how I messed up my configuration.
I was finally getting around to using phpMyAdmin and MySQL within a set of tutorials so I started to look around the menus - the options.
A Tab Named USERS listed PRIVELEGES. Under the column password…’ No Passwords were set.’

I made a huge mistake. Under the Users tab, i decided to ‘Set a Password’ for LocalHost, for example to root1234.

Back at the phpMyAdmin logon window this DID WORK.
Rather than logging in
username: root and password:root
Password: root1234 DID log me in.

But then I read a few things that said it was a mistake to change this password for it might or would cause problems later on.
So I got back into the phpMyAdmin PRIVILEGES and chose the radio button to say ‘NO PASSWORD’ and clicked ‘go’ which seemed to accept this setting.

But when I went back to PhpMyAdmin window, I am now getting the error message:

 'Logon without a password is forbidden by configuration (see AllowNoPassword).

The other error in get if i log in with an(incorrect) password is: #1045 cannot log I. To MySQL server.

Thanks for the clear help on this problem.
I know from this forum that there are many, many people who know this stuff well.
Thank you very much.

Look for this:

[php]// $cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE;[/php]

And remove the comment marks (//)

[php]$cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE;[/php]

Thanks Kevin.
This is already uncommented.

Where does this file need to reside ?

[code]config.inc.php

<?php /* * Generated configuration file * Generated by: phpMyAdmin 4.1.7 setup script * Date: Wed, 12 Feb 2014 15:34:02 -0500 */ /* Servers configuration */ $i = 0; /* Server: localhost [1] */ $i++; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i][AllowNoPasswordRoot'] = true; $cfg['Servers'][$i][AllowNoPassword'] = true; /* End of servers configuration */ $cfg['blowfish_secret'] = '52fbd5922eab21.31924738'; $cfg['DefaultLang'] = 'en'; $cfg['ServerDefault'] = 1; $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; ?>

[/code]

You might just be better off doing a clean install and use the setup wizard. Lets not forget the instructions in the docs…

http://docs.phpmyadmin.net/en/latest/setup.html

Sponsor our Newsletter | Privacy Policy | Terms of Service