Grant privileges to user in MySQL -


from control panel of website have created new mysql(5) database test , new user admin password 123. have tried assigning privileges user admin using:

grant privileges on *.* 'admin'@'localhost' 

or

grant privileges on *.* 'admin'@'test' 

i keep getting following error:

#1045 - access denied user 'admin'@'%' (using password: yes)

i need following privileges user admin:

create, alter, delete, insert, select, update, lock tables

how make in query phpmyadmin?

i guess trying change privileges of 'admin'@''%' being logged in user. strange.

you can display user logged in using

select user(); 

then check grants account has:

show grants 'admin'@''%'; 

we came conclusion have

grant privileges on `test`.* 'admin'@'%' 

that says have privileges on tables in database test. cannot further grant privileges other users, though (otherwise there with grant option).

during installation of mysql, root user created. use grant privileges other accounts.

more info in manual:


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -