创建用户语法格式:
CREATE USER <用户名> [ IDENTIFIED ] BY [ PASSWORD ] <口令>
例如:
CREATE USER 'toor'@'localhost' IDENTIFIED BY 'password';
赋予权限命令:
GRANT ALL PRIVILEGES ON *.* TO 'toor'@'localhost'
最后刷新权限:flush privileges
创建用户语法格式:
CREATE USER <用户名> [ IDENTIFIED ] BY [ PASSWORD ] <口令>
例如:
CREATE USER 'toor'@'localhost' IDENTIFIED BY 'password';
赋予权限命令:
GRANT ALL PRIVILEGES ON *.* TO 'toor'@'localhost'
最后刷新权限:flush privileges