Mysql 创建用户(包括同名数据库)及授权的基本语句
很简单的代码如下啦,别忘了换掉 username 和 password 就好了
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT USAGE ON *.* TO 'username'@'localhost'; CREATE DATABASE IF NOT EXISTS `username`; GRANT ALL PRIVILEGES ON `username`.* TO 'username'@'localhost';
近期评论