Jump to content


Photo

#1045 - Access denied for user 'root'@'localhost'


  • Please log in to reply
10 replies to this topic

#1 lone

lone

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 12 March 2006 - 11:58 AM

Sorry - back again: now I fixed the trouble with language, and have used the database once, with no problem.

Next time:#1045 - Access denied for user 'root'@'localhost' (using password: YES).
How can I get in? Any suggestions out there? I donīt know where to change these passwords, if nescessary. Very annoying, thiought it was all right....

:)
regards, Lone

#2 AlleyKat

AlleyKat

    Project Helper

  • Super Moderator
  • PipPip
  • 84 posts
  • Location:Odense, Denmark
  • SourceForge IDdk_alleykat
  • IRC Nickname: (@)AlleyKat :P

Posted 17 March 2006 - 07:51 AM

Have you changed the root password? Then you need to change it in the phpMyAdmin file too.. uhmm.. diskw\home\admin\www\mysql_password is the file if you're using the UniServer phpmyadmin config file, if not edit the config file instead.

#3 bleek

bleek

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 18 March 2006 - 02:38 AM

Sorry - back again: now I fixed the trouble with language, and have used the database once, with no problem.

Next time:#1045 - Access denied for user 'root'@'localhost' (using password: YES).
How can I get in? Any suggestions out there? I donīt know where to change these passwords, if nescessary. Very annoying, thiought it was all right....

:)
regards, Lone

View Post


I had this same problem, what I did was since the config.inc.php reads the password from a file, the mysql_password file and I figured it wasn't reading it in correctly, I hardcoded in the password just changed this on line 76

implode ('', file ('../mysql_password'));

to whatever password is your root, like so

'password';

I hope this helps.

#4 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,347 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 23 March 2006 - 10:06 PM

:)

#5 Haz

Haz

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 21 April 2006 - 08:22 PM

to whatever password is your root, like so


What do you mean by the root password? Do you mean the one in mysql_password? Because I changed it to the one in that one, and it didn't work.

Thanks!

~ Haz

#6 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,347 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 22 April 2006 - 11:16 PM

To change the root password, change the password in mysql_password.

Do not edit anything else....

#7 latschma

latschma

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 13 May 2006 - 07:08 AM

To change the root password, change the password in mysql_password.

Do not edit anything else....

View Post


Hello, I tried everything as above discussed in the forum. Nothing works. I reversed all back to the original = it works.
Then I did step by step change the passwords, as suggested in the Admin Panel 2.0 of the Uniform Server:

Security Checklist
Change the username:password for the Admin Panel by editing '/htaccess/home/admin/www/.htpasswd'
Change the username:password for the server (if private) by editing '/htaccess/www/.htpasswd'
Change the root password for mysql by editing '/home/admin/www/mysql_password'


I did it step by step.
1) Changed password for Admin Panel = works
2) Changed password for Server = works
3) Changed password for mysql in the file mysql_password = can't log in to phpMyAdmin
3a) Changed then the file config.inc.php by writing the password as discussed above directly in this file = can't log in to phpMyAdmin
3b) However, there are two files config.inc.php. One is in 'home/admin/www/includes', and one in 'home/admin/www/phpMyAdmin'. I presume it is the second one, because the first one look entirely different when opened.
4) I reversed back to root as the password in the file mysql_password, went into phpMyAdmin and tried to change root password directly in MySQL: Details: I clicked in phpMyAdmin on Privileges, clicked on edit of root, input into Change password to my password, clicked OK. Recalled the phpMyAdmin page, but this time could not log in. OK, changed now in the file mysql_password to my password. Reloaded again the phpMyAdmin page = worked!


SUGGESTION:
Please add to the Admin Panel 2.0 of the Uniform Server as follows:

Security Checklist
Change the username:password for the Admin Panel by editing '/htaccess/home/admin/www/.htpasswd'
Change the username:password for the server (if private) by editing '/htaccess/www/.htpasswd'
Change via phpMyAdmin "http://localhost/apa...dmin/index.php" in MySQL the password for root (username remains root): phpMyAdmin > Privileges > Edit root > Change password
Change the root password for mysql by editing '/home/admin/www/mysql_password'


Does this sound sensible?

#8 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,347 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 16 May 2006 - 11:07 AM

Yeah, Thanks... i noticed it causes to much confusion.

#9 ashmon

ashmon

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 19 July 2006 - 09:36 AM

Hi Guys,

I just installed the latest version of Uni Server (ver. 3.3) and I am also getting error #1045. I tried everything that was suggested in the previous posts but I still can't connect. I have no idea what the problem could be.Any help would be welcomed.

Thanks in advance

#10 ashmon

ashmon

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 19 July 2006 - 10:03 AM

Hi guys,

I don't know what I did but I fixed the problem and phpMyAdmin is working now. I just ran an older version of Uni Server to see if i get the same problem and I did. Then I ran the latest version again and it worked. Software works in mysterious ways. :D

Ashmon

#11 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,347 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 23 July 2006 - 09:44 PM

:D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users