Advanced Algorythms LLC a Colorado Company

MySQL User Management


MySQL 5.0 Command Line User Management


Using the WITH GRANT OPTION allows the account to add user accounts to the specified databases. Creating a User Account with Full Privileges on All DATABASES: GRANT ALL ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;


Creating a User with Full Privileges to a single database: GRANT ALL ON test.* TO 'username'@'127.0.0.1' IDENTIFIED BY 'password';


Creating Specific Privileges to a User on one database: GRANT SELECT, INSERT, DELETE, UPDATE, EXECUTE ON test.* TO 'username'@'192.168.0.3'; 


Removing Users: USE mysql; DELETE FROM user WHERE user = 'username' AND host = 'hostname';