mysql赋权限
1、为在mysql创建test1账号,并赋予10.96.90.78,只读amp库中alert_info_tab表的权限
grant select on amp.alert_info_tab to test1@10.96.90.78 identified by "123456";
grant select on amp.* to test1@'%' identified by "123456" WITH GRANT OPTION;
grant select on amp.* to test1@'localhost' identified by "123456" WITH GRANT OPTION;
2、取消10.96.90.78,只读amp库中alert_info_tab表的权限
REVOKE SELECT ON amp.alert_info_tab FROM test1@10.96.90.78;
3、显示10.96.90.78 ,使用test1账号有什么权限
show grants for test1@10.96.90.78 ;
show grants for test1@localhost ;
4、
MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
解决:
进入主机数据库执行:flush hosts
进入从机数据库执行:flush hosts