一、登录mysql
二、创建用户
create user [email protected] identified by ‘dev‘;
三、给新建用户授权数据库h_user的权限
授权
grant all privileges on h_user.* to [email protected];
刷新,生效
flush privileges;
也可以同时创建并授权(二、三步)
grant all privileges on h_user.* to [email protected] identified by ‘dev‘;
四、给本机授权dev
授权
grant all privileges on *.* to [email protected] identified by ‘dev‘;
刷新,生效
flush privileges;