phpMyAdmin - Error #1045 - Access denied for user 'root'@'l

  • yehuda54
  • Novice
  • Novice
  • No Avatar
  • Joined: Jun 16, 2006
  • Posts: 26
  • Status: Offline

Post June 16th, 2006, 1:28 pm

I have successfully installed and tested php 5 and mysql server on my computer. I then created a phpMyAdmin folder in wwwroot folder and copied phpMyAdmin file into the folder. I edited the following entered in the config.inc.php:
Quote:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';

$cfg['Servers'][$i]['auth_type'] = 'config'; http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';


After doing all these cofigurations I receive the following error:
Quote:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)


I rechecked, I was still able to log into mysql with the sql command prompt. So I am not clear what it means (no password)

From what I have read several websites including this one that these are the correct settings.
I searched the internet for a solution but I was not able to find anything helpful. I f anyone can please help me I would greatly appreciate it.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 16th, 2006, 1:28 pm

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post June 16th, 2006, 3:28 pm

What operating system did you install this on? And what web server?
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • yehuda54
  • Novice
  • Novice
  • No Avatar
  • Joined: Jun 16, 2006
  • Posts: 26
  • Status: Offline

Post June 17th, 2006, 8:47 pm

I am using windows xp with iis 5
  • Prime
  • Professor
  • Professor
  • User avatar
  • Joined: Dec 05, 2005
  • Posts: 935
  • Loc: Liverpool
  • Status: Offline

Post June 18th, 2006, 1:29 am

Try logging in as admin, not root.
my seo experience
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post June 18th, 2006, 1:55 am

yehuda54 wrote:
I am using windows xp with iis 5


That's what I figured. My experience is for some reason phpMyAdmin doesn't seem to like the password encryption mySQL uses. What I've found works the easiest (assuming you are going to be the only user is to start mySQL with --skip-grant-tables. And passwords set to old password. This article describes how to do that http://webyog.com/faq/23_58_en.html

Actually I find it easier to do it using the MySQL Administrator tool


I've also found for phpMyAdmin, http authentication seems to work more consistantly than config authentication.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • yehuda54
  • Novice
  • Novice
  • No Avatar
  • Joined: Jun 16, 2006
  • Posts: 26
  • Status: Offline

Post June 18th, 2006, 5:44 pm

Thank you for your replies. But, I still can't get phpMyAdmin to work. I trired switching the config file to http login but I still get the same error 1045 as before. I dont even get a popup box asking for my username and pawword.

I also tried your Skip Grant table suggestion. When I ran it, it said query ok, 0 rows effected. I guess this implies it didn't do much.

I you have any other suggestions that you can pull out of your hat --- please please let me know.

Thank You
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post June 19th, 2006, 3:33 am

hmmmm. No other ideas for the moment. Maybe reread my tutorial here
http://www.ozzu.com/programming-forum/tutorial-how-install-php-and-mysql-iis-t56303.html

It basically describes everything I do.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • yehuda54
  • Novice
  • Novice
  • No Avatar
  • Joined: Jun 16, 2006
  • Posts: 26
  • Status: Offline

Post June 19th, 2006, 5:31 pm

I used that page to setup my computer

If you find anything let me know
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post June 19th, 2006, 9:32 pm

At the moment I'm too tired to read them but try the links on this Google search
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • degiorgi
  • Born
  • Born
  • No Avatar
  • Joined: Jul 04, 2006
  • Posts: 1
  • Status: Offline

Post July 4th, 2006, 3:32 am

I confirm that phpMyAdmin 2.8.1 doesn't seem to like the mysql 5 encryption method.

I use the command :
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
to change into the old encryption method and it works now.

... enoying.

Is there a way to change it?

Thanks

Jean-Claude
  • PBS1957
  • Born
  • Born
  • No Avatar
  • Joined: Feb 09, 2009
  • Posts: 2
  • Status: Offline

Post February 9th, 2009, 5:37 pm

yehuda54 wrote:
I have successfully installed and tested php 5 and mysql server on my computer. I then created a phpMyAdmin folder in wwwroot folder and copied phpMyAdmin file into the folder. I edited the following entered in the config.inc.php:
Quote:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';

$cfg['Servers'][$i]['auth_type'] = 'config'; http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';


After doing all these cofigurations I receive the following error:
Quote:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)


I rechecked, I was still able to log into mysql with the sql command prompt. So I am not clear what it means (no password)

From what I have read several websites including this one that these are the correct settings.
I searched the internet for a solution but I was not able to find anything helpful. I f anyone can please help me I would greatly appreciate it.



The problem with the code above is that you need to comment out the following line.

$cfg['Servers'][$i]['auth_type'] = 'config'; http or cookie based)?

It hould look like this:

$cfg['Servers'][$i]['auth_type'] = 'config'; // http or cookie based)?
  • sadiq
  • Born
  • Born
  • No Avatar
  • Joined: Feb 13, 2007
  • Posts: 3
  • Loc: Dhaka
  • Status: Offline

Post February 10th, 2009, 2:38 am

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

Change 'mypassword' with your own password.


Thanks
  • PBS1957
  • Born
  • Born
  • No Avatar
  • Joined: Feb 09, 2009
  • Posts: 2
  • Status: Offline

Post February 10th, 2009, 9:44 am

#1045 - Access denied for user: 'root'@'localhost' (Using password: NO).

Look in the phpmyadmin folder for this file: config.inc.php

Open the file with any web editor so you can view the file in HTML mode.

Look for the following lines of code below. Usually the problem is that the line of code that holds the password — has no password entered. In the forth line of code below, enter the password (between the single quotes) that you gave when you installed MySQL. The “User Name” defaults to 'root' — as shown in the error message above. If the error message has something other than: 'root'@'localhost', leave the third line of code below as is, otherwise, replace the value 'root' with what ever value is between the single quotes in the error message that comes before the @ symbol.

This will correct the error and phpMyAdmin should now connect to MySQL. However, you may also encounter another error message when phpMyAdmin loads. This is caused by one or both of the last two lines of code below containing a value; in this case, the seconded line from the bottom contained the value: 'pma'. The third line of code from the bottom is the original line of code; I commented it out by adding the two slashes at the beginning of the line — just in case I forgot what value it originally contained if it needed to be changed back later.

Save the file and close the page. phpMyAdmin should now load without any errors occurring.

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456789';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

/* User for advanced features */
// Original Line of Code: $cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 10th, 2009, 3:00 pm

Guys, guys guys!!!
Image
This thread is nearly 3 years old... I'm sure that by now, the problem has being resolved.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 119 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.