#1045 Error

Problems with the Windows version of XAMPP, questions, comments, and anything related.

#1045 Error

Postby RedCP » 14. July 2012 21:39

Hey there,

So I recently downgraded to XAMPP 1.7.4 so I could finally get Apache starting (even following steps by other people, Apache would not start for me). Yeah, that doesn't matter.

So I'm working on a game, and I'm testing out the register and users and all of that. I want to add a database, but it seems I cannot get into my https://localhost/phpmyadmin/ for some reason. Here's what it says:


Welcome to phpMyAdmin

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Connection for controluser as defined in your configuration failed.
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.
Open new phpMyAdmin window


I tried changing my password, but nothing happened. I changed it in config.inc.php. Can someone please help me?

Thanks a lot.
User avatar
RedCP
 
Posts: 12
Joined: 13. June 2012 05:10
Operating System: Windows 7 Home Premium

Re: #1045 Error

Postby Takster » 15. July 2012 14:08

RedCP wrote:Hey there,

So I recently downgraded to XAMPP 1.7.4 so I could finally get Apache starting (even following steps by other people, Apache would not start for me). Yeah, that doesn't matter.

So I'm working on a game, and I'm testing out the register and users and all of that. I want to add a database, but it seems I cannot get into my https://localhost/phpmyadmin/ for some reason. Here's what it says:


Welcome to phpMyAdmin

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Connection for controluser as defined in your configuration failed.
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.
Open new phpMyAdmin window


I tried changing my password, but nothing happened. I changed it in config.inc.php. Can someone please help me?

Thanks a lot.

I had a similar problem with those errors, try this
open your windows hosts file
C:\Windows\System32\drivers\etc\hosts
find
Code: Select all
::1   localhost

comment it out.
Code: Select all
#::1   localhost

windows 7 should be fine after saving that, XP and below maybe need a restart.

Open xampp/mysql/my.ini, find the line below and uncomment it (remove the #)

Code: Select all
bind-address="127.0.0.1"

Clear your cookies and cache, restart mysql and cross your fingers it works. Don't change anything in config.inc.php either.
User avatar
Takster
 
Posts: 13
Joined: 29. August 2006 10:18
Operating System: USB etch-a-sketch

Re: #1045 Error

Postby RedCP » 30. July 2012 23:12

Takster wrote:
RedCP wrote:Hey there,

So I recently downgraded to XAMPP 1.7.4 so I could finally get Apache starting (even following steps by other people, Apache would not start for me). Yeah, that doesn't matter.

So I'm working on a game, and I'm testing out the register and users and all of that. I want to add a database, but it seems I cannot get into my https://localhost/phpmyadmin/ for some reason. Here's what it says:


Welcome to phpMyAdmin

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Connection for controluser as defined in your configuration failed.
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.
Open new phpMyAdmin window


I tried changing my password, but nothing happened. I changed it in config.inc.php. Can someone please help me?

Thanks a lot.

I had a similar problem with those errors, try this
open your windows hosts file
C:\Windows\System32\drivers\etc\hosts
find
Code: Select all
::1   localhost

comment it out.
Code: Select all
#::1   localhost

windows 7 should be fine after saving that, XP and below maybe need a restart.

Open xampp/mysql/my.ini, find the line below and uncomment it (remove the #)

Code: Select all
bind-address="127.0.0.1"

Clear your cookies and cache, restart mysql and cross your fingers it works. Don't change anything in config.inc.php either.


Isn't it in C:\xampp\mysql\bin\my.ini because I have no file called my.ini in what you said.

Also, there is no bind-address line of code.
User avatar
RedCP
 
Posts: 12
Joined: 13. June 2012 05:10
Operating System: Windows 7 Home Premium

Re: #1045 Error

Postby JonB » 31. July 2012 01:59

1st thing - does MySQL start correctly?

Connection for controluser as defined in your configuration failed.


Did you change the PW for pma as well as root?

You can use the resetroot.bat file, and it will set both 'root' and 'pma' (control user) to the 'null' (empty).

In your version, resetroot.bat is in \xampp\mysql folder.

you might want to open the file and see what it does. It puts mysql in a special mode that allows resetting critical data.

Then you can set both pw's to whatever values you want.

About the bind address issue, its not there because its a value you may or may not require (its additive) The folders for MySQL configuration files (my.ini) change periodically. You should have only one called 'either' my.ini or my.cnf.

I don't 'think' you need it (bind-address fix) as the message isn't that phpMyAdmin cannot connect at all (that would be a server is not responding or can't access mysql.sock).

I just checked a new clean 1.7.4 - no bind-address (and its working). A little checking tells me that make MySQL only work on localhost.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: #1045 Error

Postby RedCP » 31. July 2012 19:59

JonB wrote:1st thing - does MySQL start correctly?

Connection for controluser as defined in your configuration failed.


Did you change the PW for pma as well as root?

You can use the resetroot.bat file, and it will set both 'root' and 'pma' (control user) to the 'null' (empty).

In your version, resetroot.bat is in \xampp\mysql folder.

you might want to open the file and see what it does. It puts mysql in a special mode that allows resetting critical data.

Then you can set both pw's to whatever values you want.

About the bind address issue, its not there because its a value you may or may not require (its additive) The folders for MySQL configuration files (my.ini) change periodically. You should have only one called 'either' my.ini or my.cnf.

I don't 'think' you need it (bind-address fix) as the message isn't that phpMyAdmin cannot connect at all (that would be a server is not responding or can't access mysql.sock).

I just checked a new clean 1.7.4 - no bind-address (and its working). A little checking tells me that make MySQL only work on localhost.

Good Luck
8)


I'm guessing to run this through Command Prompt (resetroot.bat)? Or should I run it through xampp-shell?
Last edited by RedCP on 31. July 2012 20:19, edited 2 times in total.
User avatar
RedCP
 
Posts: 12
Joined: 13. June 2012 05:10
Operating System: Windows 7 Home Premium

Re: #1045 Error

Postby JonB » 31. July 2012 20:16

its intended for Command prompt, but I think the other would work also (its a glorified command prompt)

I would go Command Prompt
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: #1045 Error

Postby RedCP » 31. July 2012 20:19

Alright, so....this didn't work. I decided to remove the password (temporarily, of course) and see if that would work..... but it didn't. It actually still says:

USING PASSWORD: YES


which confuses me. I did run resetroot.bat (on Command Prompt) but it didn't change anything.

EDIT: Now it says NO.
User avatar
RedCP
 
Posts: 12
Joined: 13. June 2012 05:10
Operating System: Windows 7 Home Premium

Re: #1045 Error

Postby JonB » 01. August 2012 15:21

A. if you ran resetroot, did you note what was output in the Command Window.?

B. All resetroot can do is change the 'root' and 'pma' users PW's back to (empty)

C.
C-1 You could try using the XAMPP security script to create new MySQL 'root' and 'pma' passwords and 'fix' the config.inc.php file. It will also fix several other things like securing the XAMPP welcome page. There are options to save your passwords to text files, I suggest you use that option.

http://localhost/security/index.php

C-2 You could also edit the config.inc.php file manually

http://wiki.phpmyadmin.net/pma/Quick_Install#Manually


Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 94 guests