JAEN

SQL

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

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store