set global read_only=0;
set global optimizer_switch='derived_merge=off';
create user '用户名'@'%' identified by '用户密码'; // % 表示任意地址都可以访问
create database 数据库名称 DEFAULT CHARSET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
grant all privileges on 数据库名称.* to '用户名'@'%' identified by '密码'; // 某些版本语法需要调整
flush privileges;
mysql 创建用户以及授权
最新推荐文章于 2024-07-25 16:06:56 发布