Grant mysql

From UVOO Tech Wiki
Jump to navigation Jump to search
ALL PRIVILEGES - a full root access to the databases. If no database is specified, it has global access across the system.
CREATE - create new tables or databases
DROP - delete tables or databases
DELETE - delete rows from tables
INSERT - insert rows into tables
SELECT - use the SELECT command to read through databases
UPDATE - update table rows
GRANT OPTION - grant or remove other users’ privileges

Local only access superuser
CREATE USER 'username'@'localhost' IDENTIFIED BY 'the_password';
GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;

CREATE USER 'username'@'%' IDENTIFIED BY 'the_password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;