I've installed xampp on my MAC computer in my table I saw a word named user I clicked it and I saw that I was able to change from not having a password by default to using a password. I clicked it and filled in a password. Afterwards I was banned from mu phpadmin and my table. When I try getting through phpMyAdmin through the WAMPSERVER icon, a page pops up stating:

Error MySQL said:

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

I looked on this site and tried the following with no luck.

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 am not allowed to make changes in config.inc.php file, it does not save the changes.

I tried mysqladmin, no luck and in terminal - bash some commands, no luck.

Could you help me please to log in or reset?

  • 1
    They should really change these error messages in MySQL... – Kamil Dec 29 '14 at 6:13
  • If this was a database record edit, the password field is filled with a password hash, not the actual password. – Fiasco Labs Jan 18 '16 at 6:15

You will probably need to edit config.inc.php as superuser and not as your regular user account. You can accomplish this with

sudo nano /path/to/config.inc.php

(sudo causes the command that follows it to run as an administrator, essentially; nano is a command-line text editor)

It will prompt you for your mac user's password, and then launch the editor with administrative privileges (which can edit the file). Make your changes to it, and then press Ctrl+O to save the changes, and then press Ctrl+X to exit and return to the command prompt. You should then be able to log in to phpmyadmin.

The changes you'll probably need to make are:

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


If you would like to revert the changes you made (go back to not using a password), you may try the following from the command line:

mysqladmin -u root -p password ''

It will prompt you for the password you set on root, enter it, and then it should go back to root not having a password.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.