mysql 创建数据库、创建用户

-- 设置密码

SHOW VARIABLES LIKE 'validate_password%';

set global validate_password_check_user_name = 'ON';

set global validate_password_policy = 'LOW';

set global validate_password_length = 6;

 -- 创建数据库

create database if not exists smartbi;

-- 创建用户

create user smartbi@192.168.58.100 identified by "smartbi";

-- set password for smartbi@192.168.58.100 = password("smartbi");

grant all on smartbi.* to smartbi@192.168.58.100;

-- 授予用户远程登录权限

GRANT ALL PRIVILEGES ON *.* TO 'smartbi'@'%' IDENTIFIED BY 'smartbi' WITH GRANT OPTION;

-- 刷新权限

flush privileges;

posted @ 2024-01-31 10:22  瘦瘦的猴子  阅读(2)  评论(0编辑  收藏  举报