📅  最后修改于: 2022-03-11 15:05:06.739000             🧑  作者: Mango
mysql -u root -p
--enter password--
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE `myDB`;
GRANT ALL PRIVILEGES ON myDB . * TO 'user'@'localhost';
FLUSH PRIVILEGES;