CREATE USER
CautionCreate database users
CREATE USER 'name'@'host' IDENTIFIED BY '<pw>';
Creates a login restricted by host ('%' allows all). Follow with minimal GRANTs.
Examples
CREATE USER 'report'@'10.0.5.%' IDENTIFIED BY 'S3cure!';Host-restricted user
Syntax
CREATE USER 'user'@'host' IDENTIFIED BY 'password';
Before you run it
Avoid '%' and weak passwords.
Related commands
- GRANTGrant privileges
- SHOW GRANTSShow grants
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store