Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO)

I installed xampp,but when I tried to run it I got an error as thus:

Error

MySQL said: Documentation

1045 - Access denied for user 'root'@'localhost' (using password: NO)

Connection for controluser as defined in your configuration failed. phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

I tried to search on internet for a solution, but I still can't fix my problem. I have already checked whether I used a password or not in config.inc.php file but i have not used any password.Also, when i try to access with a password, I still can't solve this problem.

I hope anyone can help me. .thank you

like image 747
Saya Antisosial Avatar asked Jun 19 '12 07:06

Saya Antisosial


People also ask

What is MySQL documentation used for?

MySQL Document Store allows developers to work with SQL relational tables and schema-less JSON collections. To make that possible MySQL has created the X Dev API which puts a strong focus on CRUD by providing a fluent API allowing you to work with JSON documents in a natural way.


2 Answers

I had this problem after changing the password for the root user in phpMyAdmin. I know nothing about programming but I solved it by doing the following:

  1. Go to file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php (I guess you would replace "wamp" with the name of your server if you're not using Wamp Server)

  2. Find the line $cfg['Servers'][$i]['password']='' and change this to

    $cfg['Servers'][$i]['password']='NO' 
  3. Try opening phpMyAdmin again, and hopefully the message will now read "Access denied for user 'root'@'localhost' (using password: YES)

  4. Now change the password in the above line to 'yourpassword' (whatever you had set it to before)

Hope this helps somebody.

like image 153
supernewbie Avatar answered Sep 29 '22 03:09

supernewbie


Go to the file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php

Find the line $cfg['Servers'][$i]['password']='' and change it to

$cfg['Servers'][$i]['password']='root' 

where root is the name of the password you had set in this instance

Hope this helps somebody.

like image 37
Sifudu Peter Avatar answered Sep 29 '22 05:09

Sifudu Peter