首先创建账户
CREATE USER 'test'@'host' IDENTIFIED BY 'test';
授权GRANT 权限 ON 数据库
.表 TO ‘用户’@’%’;
GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, CREATE VIEW, SHOW VIEW ON `cti`.* TO 'test'@'%';
如果要只读的话可以只给select 权限
首先创建账户
CREATE USER 'test'@'host' IDENTIFIED BY 'test';
授权GRANT 权限 ON 数据库
.表 TO ‘用户’@’%’;
GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, CREATE VIEW, SHOW VIEW ON `cti`.* TO 'test'@'%';
如果要只读的话可以只给select 权限