- 先创建数据库
- 创建用户并赋予一个数据库的所有权限
use mysql;
create database databaseName character set utf8;
grant all privileges on databaseName.* to [email protected]'ip' identified by 'password';
举例:
use mysql;
create database test_db character set utf8;
grant all privileges on test_db.* to [email protected]'localhost' identified by '123456';
原文地址:https://www.cnblogs.com/fsong/p/11335206.html
时间: 2024-10-16 05:35:44