Grant previlage problem -mysql


i have create user in myql

CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'testpass'"

then assign privileges to the user for particular db,that user should have all privileges create,select,insert etc…

so i have use the query like this

  GRANT ALL PRIVILEGES ON  dbname.* TO testuser'@% IDENTIFIED BY 'testpass'")  

it show the privileges option as usage only in mysql, how can i give all privileges ,can any one tell me what wrong in my query, i couldnt create table with the user.

Did you do:


After running the query to change the privileges?

i have run the above flush query but afterwards too i cant see grant all privileges

	User 	    Host 	Password 	Global privileges    	Grant 		
	        general  localhost No      	USAGE 	                 No 	

like this only i can see the

Firstly issuing the GRANT statement automatically FLUSHes the privileges, so you do not need to do this unless you update the mysql database tables directly. Also you need to be aware that you have created two separate logins above testuser@localhost and testuser@%. If you are logging in from the same host as the server then the testuser@localhost will be used. If you attempt to login from another host then the testuser@% will be used. I think that this is the source of your problem.