1.CREATE USER 'yangxiaohui'@'192.168.56.10' IDENTIFIED BY 'yangxiaohui'; -- 创建一个用户,192.168.50.10 指得是只有这个ip地址才能登录 如果是允许所有用户登录使用%
2. drop user 'yangxiaohui'@'192.168.56.10';-- 删除用户和授权
3. grant select, insert, update, delete on shop.* to yangxiaohui@'192.168.56.10'; -- 授权用户访问某个库的权限
4. grant all privileges on *.* to 'yangxiaohui'@'192.168.56.10' ;-- 授予所有权限
5. flush privileges; -- 刷新一下授权