Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Gert Myburgh (41.183.23.---)
Date: May 09, 2014 12:27AM

Just to put this to bed, my WampServer icon is green and I am able to serve a page of HTML and PHP. It is phpMyAdmin that is giving me problems.

Setting the scene (What I managed to do and what I have tried before v2.5 64bit/32bit)
=====================================================
WampServer 2.0 is successfully running on my Windows XP machine and WampServer 2.4 32bit is successfully (after some initial trouble for two days) running on my Windows 7 Laptop.

So I now wanted to install WampServer 2.4 32bit on my latest/new 64bit machine but no luck. Just can’t open phpMyAdmin without a password that I don’t have and have not set in the first place.

I am aware of the fact that you can install the 32bit version of most software on your 64bit system. The plan was to go up to the 64bit WampServer edition if I later needed some increase in performance.

New machine specs
============
64bit Motherboard with i7 chip
12GB RAM
64bit Windows 7 Ultimate

The problem this time was different than what I experienced on my Windows 7 Laptop. As mentioned above, this time it wanted me to type in a password for phpMyAdmin/MySQL. It was happy on my Windows 7 laptop with the "empty/no" default password when I installed a fresh version of WampServer 2.4. But not this time.

Now here is a question, "This is a brand new installation right, so where does WampServer 2.4 32bit get the idea from that I had a password before?". Ok so I scratched around for days going through forums and particularly the WampServer forum.

I read about things like, apart from some other stuff:
1. resetting the ROOT password (which I never had set to start with)
2. my.ini settings
3. some changes to some config files
4. making sure no old MySQL installations exists.
5. Making sure you don’t just install over old versions of WampServer
6. Hash password jargon etc., etc.
7. Installing VC++ redistributables

And I did all of the above and more. Still no luck.

Hoping to save myself from further frustration and all the other ugly stuff some of you ran into, I decided to clean up my machine and install the 64bit v2.5 of WampServer, but hey guess what, I got stuck again.

Then back to the forums I went and I see the thread in which RiggsFolly suggests to rather install the 32bit version of WampServer 2.5 so I did. So I uninstalled the 64bit version of 2.5 and deleted all my.ini files that was not removed and I removed the “wamp” folder. So now I made the assumption that I will start afresh with the v2.5 32bit version.

And still I get this error when opening phpMyAdmin:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

A few threads talks about resetting the ROOT password and telling you to go via menu WampServer\MySQL\MySQL Console to reset the password from within. I can’t use my MySQL Console because with a password or without a password typed in when the console opens, it just beeps and the Window closes.

As I have said, my WampServer icon is green and I am able to serve a page of HTML and PHP.

I have run out of ideas. Please help.

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Ap0calyps3 (---.access.mtnbusiness.co.za)
Date: May 09, 2014 12:58AM

I know you tried the mysql console window no password, but you didnt mention trying this on phpmyadmin. put root for user and leave password field blank, and click login. Let me know if you have already tried this or not

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RiggsFolly (---.as13285.net)
Date: May 09, 2014 02:59AM

For some reason they seem to have gone back to the old way of configuring phpmyadmin.
That is to store the Userid and Password in the phpmyadmin config script.

Can I suggest that you edit \wamp\apps\phpmyadmin\config.inc.php and change this section to what is below.


/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Then you should get the login page again.

I fyou have a vanilla install, Use :-

Username = root
Password = blank


Once you have sucessfully logged in and set a password on the 'root' userid you should then go back and change this line

$cfg['Servers'][$i]['AllowNoPassword'] = true;

To

$cfg['Servers'][$i]['AllowNoPassword'] = false;

This will correctly protect your databases i.e. not allow accounts with no password to login.

This of course means that you should always set a password on all the new accounts you create as leaving the password blank will mean that account will not be able to login.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Gert Myburgh (41.183.23.---)
Date: May 09, 2014 08:24AM

Hi RiggsFolly,

O yes, that is always the third thing I do is to click on the phpMyAdmin menu option to see if my new/updated installation will allow me access to the database side of things.

My checklist after every installation/update
===========================
1. Check if I get the green WampServer icon when WampServer is launched.
2. Open localhost to see if my DEFAULT page gets served and if I can at least open from that page, phpinfo and phpmyadmin under the Tools heading on that page. Here I use ‘root’ with no password.
3. To just make double sure things work I then again open phpMyAdmin but this time from the WampServer menu and obviously this is where I use ‘root’ with no password again.
4. Then I check the versions of Apache, PHP and MySQL that were installed.
5. Then I read the forums to see if I need to make any changes to ini or config files.

Obviously I read the forums before an Installation also to minimise any frustration that might appear during installation and to make sure that my installation will be correctly configured.

Although I am sure that I have tried all the suggestions from the other replies, I am going to try them again because I am desperate and one should never assume you covered all possibilities.

PS: I forgot to tell you that with some of the installations when opening phpMyAdmin I do get to the Username and Password screen but when pressing ENTER it tells me I need a password but sometimes I don't even get to the login screen like in this case (v2.5 32bit). I get the error above inside 2 nice pink blocks. smiling smiley

Regards,

Gert Myburgh
South Africa



Edited 2 time(s). Last edit at 05/09/2014 08:36AM by Gert Myburgh.

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Gert Myburgh (41.183.23.---)
Date: May 09, 2014 09:31AM

Hi RiggsFolly,

Just for the record: My WampServer icon is green and both services are started in Windows 7. I double checked. I can serve HTML and PHP pages. Just in case you were wondering.

This time with the suggested changes to my C:\wamp\apps\phpmyadmin4.1.14\config.inc.php file I did indeed get to the Login screen. Yipee!!, but, it is still not working. It still wants a user and password.
1. I tried leaving user and password blank, no luck.
2. Then I use ‘root’ for user and I left password blank but no luck.

Then I decided to go back to the config file and follow you further suggestions to put a username and password in and also to change the ‘AllowNoPassword’ setting to ‘false’. Still no luck. I now get at least a different error:

#2000 Cannot log in to the MySQL server

You said in your reply:
“Once you have successfully logged in and set a password on the 'root' userid you should then go back and …”

“set a password on the 'root' userid”. I have tried both ways of setting/resetting the ‘root’ password but just can’t do it. From the menu of WampServer it opens the MySQL console and immediately asks for a password. Leaving it blank does not work and putting a password in my config file and returning to the console trying the new password, also does not work. I also tried the command line method of creating a txt file with the ‘SET Password=PASSWORD..’ and passing it as a parameter to ‘mysqld.exe’. No luck at all.

Don’t know if this will tell you anything but in my config file this line was active:
$cfg['Servers'][$i]['auth_type'] = 'config';

But I changed it to your sample to read:
$cfg['Servers'][$i]['auth_type'] = 'cookie';

This whole experience is so strange. I just want a clean default installation. How hard can that be.

Gert Myburgh
South Africa



Edited 1 time(s). Last edit at 05/09/2014 09:41AM by Gert Myburgh.

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RiggsFolly (---.as13285.net)
Date: May 09, 2014 01:58PM

OK Gert,

If that does not work maybe you have another MySQL server running on your PC, or a rough my.ini file in one of the folders MySQL uses to search for a my.ini


1. Check the services that are running, wampservers MySQL service is called wampmysql, if you have another version installed it is probably called 'MYSQL'

If this is the case, uninstall it if you dont know why its there, normally its because people try to install a WAMP stack manually and then give up and try WAMPServer when it all gets to difficult.
If you find another MySQL installed also do step 2. The windows installer installation of MySQL puts its file in the C:\windows folder structure somewhere. Very annoying.


2. Search for 'my.ini' and 'my.cnf' on your C: drive. If you find one anywhere outside the \wamp\... folder structure, delete it or rename it at least.

Then try wamp's mysql again.

There are some installations ( probably ripped off ) that seem to have a my.ini in the C\windows folder structure and this is one of the places MySQL looks for its ini file.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Gert Myburgh (41.183.23.---)
Date: May 09, 2014 04:26PM

Hi RiggsFolly,

!!!Yes, Yes, Yes!!!

My phpMyAdmin/MySQL seems to work now just fine.

A package called Pentaho might have been the culprit.

I double checked again the my.cnf’s and my.ini’s as you suggested that might have fallen inside the scope of where WampServer looks for it and stumbled across this package that I installed and I recalled it uses MySQL. So I just uninstalled it for now and there you go.

I will need Pentaho again in the future but that is a battle for another day. For now I am happy that my phpMyAdmin is working and my Console problem is also now sorted.

Thank you for all your help and excellent service you give to the WampServer community.

Regards,

Gert Myburgh
South Africa

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: will.horner (---.hsd1.va.comcast.net)
Date: May 17, 2014 07:38PM

Wow. Been looking for an answer all morning and finally the solution! Feels great to see such great support! I'm trying to setup my daughters college laptop for html/php/mysql programming for her upcoming summer session! I have WAMP running on my laptop and it works great! After trying about 4 hours of everything including multiple install/uninstalls, editing all the conf files, etc it was another MYSQL service/program running. I just tried renaming the my.ini file first but this didn't work so I stopped the MYSQL Service (and it is set to Automatic startup) the phpMyAdmin is working with the default blank password!

Thanks so much for the support!

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Rakhi (115.242.57.---)
Date: May 27, 2014 07:39PM

hi!
Even I'm facing exactly the same problem, I installed wamp sever and I got thr error #1045 - Access denied for user 'root'@'localhost' (using password: YES) . I have tried out all possible ways but still unable to resolve this. Please Help me resolve this!

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RiggsFolly (---.as13285.net)
Date: May 27, 2014 07:46PM

By default on a new MySQL install there is ONE user account called 'root' and it has NO password.


So try

Username = root
password = blank ( Leave this empty )

See links to the documentation on my signature

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: Rakhi (115.242.38.---)
Date: May 27, 2014 09:36PM

I have finally solved this problem, I had another instance of MySQL service running on my laptop, also I deleted all the my.ini files that were outside the wamp folder on C Drive, then I uninstalled the wamp server as well as deleted the wamp folder in C drive, restarted my laptop, again installed the wamp server and then boom it runs fine.. and I no more get phpMyAdmin error #1045.
Thanks a lot to everyone!! smiling smiley



Edited 2 time(s). Last edit at 05/27/2014 09:39PM by Rakhi.

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RajRB (---.static.ziggozakelijk.nl)
Date: October 14, 2014 11:18AM

Hi RiggsFolly,

Thanks a lot for providing wonderful support for the users.

Actually, I installed WAMP 2.5 version(Apache:2.4.9, PHP: 5.5.12,MySQLVersion:5.6.17. I followed all your steps in your post dated: May 09, 2014 02:59AM.

I set password inside phpadmin by editing privileges for User:root, Host: Localhost and query was accepted succesfully. And then changed 'AllowNoPassword' to false in confic.inc.php and then restarted wamp server. But finally I am not able to login with password at all. It displays "Login without a password is forbidden by configuration (see AllowNoPassword)".

Also, I installed wamp in G drive and checked my.ini and my.cnf in all my drives. Still it did not work. Also, when I installed wamp, my anti virus avira displayed "Host file blocked". So, I turned off avira and followed the same procedure as before and it did not work out.

Also, from my task manager, I can see that no other service runs mysql. Please help me out as I am stuck with this for many days sad smiley . Thanks in advance!!

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 14, 2014 11:40AM

If you want to try a teamviewer session so I can see what you have actually done then install TeamViewer ( its free)

Then send me a Private Message with the ID and PASSWORD from teamviewer so I can connect and we can have a look together at what the problem is.

Dont put the teamViewer ID and PASSWORD in a standard post!!

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RajRB (---.static.ziggozakelijk.nl)
Date: October 14, 2014 12:10PM

Hi RiggsFolly,

Thanks a lot for a quick response!. I have never seen such a response for my query anywhere smiling smiley So happy!

Atlast, it worked just now using MySql console with the following commands as per this link
(http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html)

shell> mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;

Then I restarted my wamp and it logged into phpadmin only with the password.

But why does still my config.inc.php looks like below;

/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Thanks a lot RiggsFolly! I really appreciate your concern.

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 14, 2014 12:32PM

Ok I think your problem was this.

Most OS's network stacks incorporate IPV4 and IPV6 so the Users in the MySQL database should also take this into account.

The default accounts in WAMPServers MySQL are

root@127.0.0.1 ( IPV4 )
root@::1 (IPV6)
root@localhost (Could be either depeding on your HOST file config )


When you changed the password for root, I guess you changed only ONE of the above. But the browser, some how makes a decision internally ( I will find out what controls this decision one day) to use either IPV4(127.0.0.1) or IPV6(::1) for the connection to the web server.

So I am guessing you changed the password for root@::1 but the browser decided to connect via IPV4 and therefore root@127.0.0.1

This caused the confusion.


As to why your config.inc.php looks like it does?? I am not sure what you mean! What looks wrong and what did you expect to change.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RajRB (---.static.ziggozakelijk.nl)
Date: October 14, 2014 02:49PM

Hi RiggsFolly,

Thanks for the explanation. What I meant is, since I am able to login with only password (for root),

why does "$cfg['Servers'][$i]['AllowNoPassword'] = true;" is still true? Shouldn't it be false?

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 14, 2014 04:05PM

As you have added a password to the root user you should turn that parameter to false, correct.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Brand new WampServer v2.5 32bit installation - phpMyAdmin error #1045
Posted by: RajRB (---.static.ziggozakelijk.nl)
Date: October 14, 2014 05:27PM

I thought it would have automatically changed the setting to false.

Thanks for the details!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.