user3141777
user3141777

Reputation: 189

#1044 - Access denied for user 'someuser'@'localhost' to database 'somedb'

I'm tried a lot to import the sql script to create database and tables through phpmyadmin in the new site I hosted. But i'm getting the error,

#1044 - Access denied for user 'someuser'@'localhost' to database 'somedb'

I tried to create a sample db directly : create database sampled; I'm getting the same access denied error.

I'm not able to grant privileges to the user also, i'm getting the same access denied error.

Following is the output of show grants command,

show grants;
GRANT USAGE ON *.* TO 'someuser'@'localhost' IDENTIFIED BY PASSWORD 'somepw' 


GRANT ALL PRIVILEGES ON `someuser\_%`.* TO 'someuser'@'localhost' 

Any help would be appreciated. thank you.

Upvotes: 0

Views: 2256

Answers (1)

Isaac Bennetch
Isaac Bennetch

Reputation: 12422

According to your GRANT statement, your user is authorized on databases starting with someuser_ (the \ escapes the underscore and % is the wildcard here). So somedb doesn't match. You could use someuser_somedb or someuser_anything_else_here.

Upvotes: 0

Related Questions