0

I have installed mysql and am trying to connect with phpmyadmin. When configuring connections in the workbench, I can confirm that this username/password combo exists:

root : [password]

Here is my config:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Server'][$i]['user'] = 'root';
$cfg['Server'][$i]['password'] = '[password]';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

I set [password] for all users. Additionally, I have tried every possible username for root. Nothing works. Changing the host to be '127.0.0.1' does not work. I consistently get this error message back:

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

and

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.

If it helps, I am using IIS8, not Apache.

EDIT: I thought I should mention that all logins have access from %, localhost, or 127.0.0.1

2
  • Your error is telling you that you're trying to connect without a password. Try changing $cfg['Servers'][$i]['AllowNoPassword'] to false Commented Feb 14, 2014 at 3:50
  • This gives me an "invalid settings" error. Commented Feb 14, 2014 at 3:52

2 Answers 2

1

I think

$cfg['Server'][$i]['user'] = 'root';
$cfg['Server'][$i]['password'] = '[password]';

should be

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

Just missing an 's'.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you! i don't know how i could have deleted those characters but it was a very infuriating two hours...
Typos are the worst :)
0

You Can reset your root password.

1 Comment

I have done this multiple times using mysql workbench user connections interface. Is the query version different?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.