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

  • yehuda54
  • Novice
  • Novice
  • yehuda54
  • Posts: 26

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

What operating system did you install this on? And what web server?
  • yehuda54
  • Novice
  • Novice
  • yehuda54
  • Posts: 26

Post 3+ Months Ago

I am using windows xp with iis 5
  • Prime
  • Professor
  • Professor
  • User avatar
  • Posts: 935
  • Loc: Liverpool

Post 3+ Months Ago

Try logging in as admin, not root.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • yehuda54
  • Novice
  • Novice
  • yehuda54
  • Posts: 26

Post 3+ Months Ago

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
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • yehuda54
  • Novice
  • Novice
  • yehuda54
  • Posts: 26

Post 3+ Months Ago

I used that page to setup my computer

If you find anything let me know
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

At the moment I'm too tired to read them but try the links on this Google search
  • degiorgi
  • Born
  • Born
  • degiorgi
  • Posts: 1

Post 3+ Months Ago

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
  • PBS1957
  • Posts: 2

Post 3+ Months Ago

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
  • sadiq
  • Posts: 3
  • Loc: Dhaka

Post 3+ Months Ago

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

Change 'mypassword' with your own password.


Thanks
  • PBS1957
  • Born
  • Born
  • PBS1957
  • Posts: 2

Post 3+ Months Ago

#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
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

Guys, guys guys!!!
Image
This thread is nearly 3 years old... I'm sure that by now, the problem has being resolved.

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 139 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.