Grant mysql

From UVOO Tech Wiki
Revision as of 19:31, 27 April 2023 by Busk (talk | contribs) (Created page with "``` 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 - d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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;