MySQL Forums
Forum List  »  PHP

Re: phpMyAdmin - #1045 - Access denied for user 'pmausr'@'localhost' (using password: YES).
Posted by: Richard Ward
Date: October 12, 2006 04:30AM

you need to create a user in MySQL before installing (or now).
The user and password you create in mysql should be the same you set in these lines:

$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

Currently you have 1 user in your mysql dabatase (I'm presuming a fresh install) and that is the "root" user.
Now you need to create a new one - "phpmyadmin" (or whatever you shoose) that will be the "controlling" user for the phpMyAdmin application.

It should be somewhere in the phpMyAdmin install guide, but anyway - the create user syntax in mysql is:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
where you substitute username with the username you want and some_pass with a password you want.
You then need to put those 2 into the:
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

Those rights for the user are a bit too much but check the link below for the correct privileges. (you porbably need create, drop, alter table, along with select, insert, update and delete..
from: http://dev.mysql.com/doc/refman/5.0/en/adding-users.html

Sorry for repeating myself but hiope that helps.

Options: ReplyQuote


Subject
Written By
Posted
Re: phpMyAdmin - #1045 - Access denied for user 'pmausr'@'localhost' (using password: YES).
October 12, 2006 04:30AM
October 17, 2006 11:45PM
October 18, 2006 09:46AM
November 14, 2006 01:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.