How to give full privileges to the user in MySQL

 

mysql

 

I have created the new database and the user in that respective DB...

Now i need to grant the privileges to that user for full access instead of localhost. what is the syntax....??

Tags: MySQL (My- Structured Query Language)
user image Author :   ethan
0

Just give asterisk (*) symbol instead of the respective Db name... For example: I created the user called 'testing' and am going to give the full privileges as follows,

GRANT ALL PRIVILEGES ON * . * TO 'testing'@'localhost'; FLUSH PRIVILEGES;

user image
jagan January 11, 2017
Add comment
0

Thats fine.... at last you have given @'localhost' right, it will work only in that host... I cant use it in remote MySQL... how to change the syntax???

user image
karthikeyan January 11, 2017
Add comment
0

ohh for remote access just use wildcard symbol instead of 'localhost'

CREATE USER 'testing'@'%' IDENTIFIED BY 'password'; GRANT ALL ON * . * TO 'testing'@'%';

user image
jagan January 11, 2017
Add comment
0

GRANT ALL PRIVILEGES ON * . * TO 'testing'@'localhost'; FLUSH PRIVILEGES; in above tag have you given full privileges for that user it is similar to act as root access fine. now my question is how to give particular database and particular table access to user ......?

user image
akr February 09, 2017
Add comment