SQL Command – Grant privilege to user

SQL Command

Grant all privilege to user on all databases(in MySQL system) with grant privilege.

GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION;

Grant all privilege to user on all databases(in MySQL system) WITHOUT grant privilege.

GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';

Grant all privilege to user on a certain database WITHOUT grant privilege.

GRANT ALL PRIVILEGES ON abc.* TO 'user'@'localhost';

oliver

Leave a Reply

Your email address will not be published. Required fields are marked *


*