Home | Mirror | Search |
CREATE USER user [IDENTIFIED BY [PASSWORD] 'password'] [, user [IDENTIFIED BY [PASSWORD] 'password']] ...
CREATE USER 'test'@'xxx.xxx.xxx.xxx' IDENTIFIED BY 'your_password';
add a new user by grant
GRANT ALL PRIVILEGES ON opencart.* TO 'neo'@'localhost' IDENTIFIED BY 'chen' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'neo'@'localhost' IDENTIFIED BY 'chen' WITH GRANT OPTION; FLUSH PRIVILEGES;
DROP USER user [, user] ...
mysql> drop user admin@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> drop user admin@'127.0.0.1'; Query OK, 0 rows affected (0.00 sec)
SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass'); SET PASSWORD FOR 'root'@'%' = PASSWORD('co2uqAMAho1aSOS62146Xoci6ogu4I');
CREATE USER 'root'@'192.168.1.%' IDENTIFIED BY 'password';