User Tools

Site Tools


docu:csheet:sysadm:db:my:create_user

Create a new user in MySQL

Cheat sheet:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
CREATE USER 'newuser'@'%' IDENTIFIED BY 'password';
CREATE USER 'newuser'@'127.0.0.1' IDENTIFIED BY 'password';
 
GRANT USAGE ON *.* TO 'newuser'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
GRANT ALL PRIVILEGES ON db.table TO 'newuser'@'localhost';
docu/csheet/sysadm/db/my/create_user.txt · Last modified: 2020/02/10 10:28 by admin