visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: Access denied for user: 'root@localhost' (Using password: YES)


By: Squibi U.S.A.  Date: 15/01/2003 00:00:00  English  Points: 25 Status: Answered
Quality : Excellent
I am new at this and I am at a loss. I keep getting this error


Welcome to phpMyAdmin 2.3.2

Error

MySQL said:

Access denied for user: 'root@localhost' (Using password: YES)


I have tried to set the root password in mysql but I get this error

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'

What do I need to do to fix this????
By: VGR Date: 15/01/2003 19:58:00 English  Type : Answer
set up initial access privileges as per the documentation of mySql

first abandon(for the time being) any GUI tool that you have

switch to console ("DOS command line" or unix tty), ensure that mysql binaries (~mysql/bin) are in your path, or switch current directory to that place.

Then try manually to enter mysql

type :

mysql --user=root

if it works, then you have not yet set a "root" password, you should add one and flush privileges

if it fails with "bad password" or "password required" then issue :
mysql --user=root --password=yourpassword

if it still doesn't let you in, then consider following the procedure in the mysql documentation about "lost root password and resetting privileges".

doc is at <A HREF="http://www.mysql.com/doc/en/index.html">http://www.mysql.com/doc/en/index.html</a>

Regards
By: TheFalklands Date: 12/03/2003 06:07:00 English  Type : Comment
Make sure you phpMyAdmin config file was changed to include your Mysql user information. The file is called config.inc.php. Go down about half way and you should come to a section that looks like this:

// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables)
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; //


The very last line above $cfg['Servers'][$i]['password'] is by default blank for the root user. If you setup your mysql server with a password for the root user then you need to change that line from a blank to whatever password you chose. Also if your root user is a different name than the default "root" then you need to change that in the line above.

Do register to be able to answer

EContact
browser fav
page generated in 418.754100 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page