1
votes

I am trying to set up my WordPress project, and I am using WampServer. In phpMyAdmin, I simply tried to create a new database, but I got this error : #1044 - Access denied for user ''@'localhost' to database 'wp'. I never had this problem before.

2

2 Answers

1
votes

In WAMPServer when you run phpMyAdmin you are shown a login screen.

By default :

The Username = root

And the Password is not set so you should not enter a password in the Password field.

Then press the Go button to login.

This will log you in as the root SuperUser, who can do anything on a MySQL Server.

If you leave the Username blank, like it appears you did, you are logged in as an annonymous user with no rights to do anything much at all.

0
votes

Login to the web console for phpMyAdmin and navigate to the wp database

Click on the SQL tab and paste this code:

grant all privileges on wp.* to user@localhost identified by 'PASSWORD'; flush privileges; \q

Change the user's credentials to match your config, then Click Ok and it should work!

You can read more about GRANT's syntax at MySQL's site.

Hope it helps!