9

In phpmyadmin I created a user called "edward" with password and all privileges:

enter image description here

Yet when I try to log in via phpmyadmin, it says "Cannot log in to the MySQL Server".

When I try to log in on the command line (Windows 7), it won't allow me either: enter image description here

But if I login in without a password, I get in:

enter image description here

and shows me only two of the tables.

I'm sure the password is correct and I've created multiple users which all can't log in with their passwords no matter how many rights I give them.

How can I get this user to be able to log in only with password and see all databases?


Addendum:

Here is a screenshot from phpmyadmin showing that "edward" has just as many rights as "root":

enter image description here

Edward Tanguay
  • 191
  • 1
  • 1
  • 6

3 Answers3

6

Because you granted it access without password... If a user has no password, logging in with one will always fail.

Set the password for user, only then you'll be able to use -p

In addition, you might want to remove the Any user.

adib
  • 103
  • 4
poncha
  • 176
  • 1
  • 3
0

Most possibly you have granted privileges on the server, but not on the databases. Try GRANT ALL ON *.* TO 'edward' IDENTIFIED BY 'password'

Eugen Rieck
  • 181
  • 2
0

Same problem couldn't figure it out for nothing. Erased the database, removed the directory and reinstalled on Centos 6.3. The command line shows some data that is then scrolled quickly that solved the problem for me. Pasted below.

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h cch-web-centos password 'new-password'

Alternatively you can run:

/usr/bin/mysql_secure_installation

The last one is what worked for me. I entered a root password and it actually WORKED. Entering a root password using mysqladmin without running that script gave me the same errors Edward reported. Run the script, answer the questions, now using the root password works and logging in without the password is denied. This one drove me crazy as well. I've installed mysql lots of times and this is the first time I've had this problem. Not sure if it is a yum/centos thing as on Ubuntu and Fedora I didn't have this problem.

PiTheNumber
  • 105
  • 6
armel
  • 1