ERROR 1045 (28000) Access denied for non root user!

February 8, 2015 1.3k views

Step 1:

Install mysql :
$sudo apt-get install mysql-server
$sudo apt-get install mysql-client
$sudo mysqlsecureinstallation
that means there is no test users and no users with none passpord;

Step 2: install phpmyadmin

the script create the database and user for PMA, It run smoothly!

Step 3:

I create a wordpress user by doing :
mysql> CREATE USER wordpressuser@localhost IDENTIFIED BY '****';
mysql> GRANT ALL PRIVILEGES ON wordpress.
TO wpdbuser@localhost;

Step 4:

mysql -uwordpressuser -p

after entering the correct password ,I got this ERROR 1045.

I should tell you guys that:
I can access root by using: mysql -uroot -p;
I can access root by using phpmyadmin web client;

It all work perfectly except the new wordpress user, any one has this problem before?

  • Did this query run without any errors?

    GRANT ALL PRIVILEGES ON wordpress. TO wpdbuser@localhost;

    I'd recommend trying:

    GRANT ALL ON wordpress. TO wpdbuser@localhost;

    If you have root access to phpmyadmin you can also set up your wordpress user account via the GUI granting the appropriate privileges.

  • Going to bump this, having the same issue...Anyone?

Be the first one to answer this question.