1

I had the same problem mentioned here, so I logged in as webuser on mydomain.de/phpmyadmin and executed the query from the most pupolar answer:

GRANT ALL PRIVILEGES ON *.* TO 'webuser'@'localhost' IDENTIFIED BY 'webuser' WITH GRANT OPTION;

After that, I'm not able to login to phpmyadmin anymore with user=webuser.

 #1045 Cannot log in to the MySQL server.

But on my website (subdomain.mydomain.de), where I use the same login to connect to my mysql-database, everything is ok.

What have I done and how can I fix this?

Community
  • 1
  • 1
Munchkin
  • 4,528
  • 7
  • 45
  • 93
  • Are you able to login via terminal ? Have you used FLUSH PRIVILEGES; after the granting? Check the user table and the privileges from the webuser via the root user. – Zelldon Jun 19 '15 at 10:47
  • yes I am. And on my website I can execute queries with using this users name and pw for db connection – Munchkin Jun 19 '15 at 11:01
  • Is mysql running on the same box as phpMyAdmin? – Daz Jun 19 '15 at 11:29
  • yes both run at the same machine. see my changes in the question. – Munchkin Jun 19 '15 at 13:05
  • As I just read here: http://stackoverflow.com/a/5016587/1654763 , i should remove these privileges from `webuser`, because I use this account for my website. I could create a simple php file which just connects to mysql-db and execute a query which removes these global privileges - but how should this query look like? – Munchkin Jun 19 '15 at 13:18

1 Answers1

1

Problem solved: I logged in as root and changed the password for webuser. I think the command GRANT ALL PRIVILEGES ON *.* TO 'webuser'@'localhost' IDENTIFIED BY 'webuser' WITH GRANT OPTION; resettet the password for webuser

Munchkin
  • 4,528
  • 7
  • 45
  • 93