Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

grant revoke privileges to mysql username

#in SQL execute
#GRANT type_of_permission ON database_name.table_name TO 'username'@'localhost';
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
#reload all the privileges
FLUSH PRIVILEGES;

#Show Privileges
SHOW GRANTS FOR 'username'@'localhost';

#Revoke Privileges
REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';
 
PREVIOUS NEXT
Tagged: #grant #revoke #privileges #mysql #username
ADD COMMENT
Topic
Name
5+4 =