谨慎使用,当时我测试的时候就出现问题,结果导致无法登陆数据库。
使用SQL Server Log On trigger:
CREATE DATABASE AuditDb
GO
USE AuditDb
GO
/* Create AuditTable */
CREATE TABLE ServerLogonHistory
...
grant 权限 on 数据库对象 to 用户 password
远程用户有赋予权限的权限
grant all privileges on *.* to root@'%' identified by '123456' with grant option;
mysql> grant all on *.* to ro...