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