mysql 权限设置,创建用户
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION
SHOW GRANTS FOR 'root';
SHOW GRANTS FOR 'compdev';
SHOW GRANTS FOR 'selectastore';
-- 创建用户
CREATE USER 'username'@'host' IDENTIFIED BY 'password';
CREATE USER 'compdev'@'%' IDENTIFIED BY 'comp3edcMJU&';
-- 设置密码
SET PASSWORD FOR 'compdev'@'%' = PASSWORD("comp3edcMJU&");
-- 设置密码
SET PASSWORD FOR 'selectastore'@'%' = PASSWORD("Astore_2018er");
-- 赋权
GRANT SELECT, INSERT ON test.user TO 'selectastore'@'%';
GRANT ALL ON *.* TO 'selectastore'@'%';
-- 刷新权限
FLUSH PRIVILEGES;
-- 创建dblink
CREATE TABLE ability_oparty_msg_view(
`abilityName` VARCHAR(64) NOT NULL COMMENT '接口英文名',
`abilityVersion` VARCHAR(64) NOT NULL COMMENT '版本号',
`abilityChNames` VARCHAR(64) NOT NULL COMMENT '接口中文名',
`opartyName` VARCHAR(64) NOT NULL COMMENT '接口调用方',
`url` VARCHAR(128) NOT NULL COMMENT '地址'
)ENGINE=FEDERATED DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='平台能力信息表' CONNECTION='mysql://selectastore:Astore_2018er@32.1****:13306/comp_workbench/ability_oparty_msg_view';