赞
踩
新建用户(数据库在真机,实验环境在虚拟机需要远程):
use mysql;
创建新用户
create user 'admin'@'%' identified by 'Password66';
执行授权
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%';
刷新
FLUSH PRIVILEGES;
授权远程
ALTER USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'Password66';
刷新
FLUSH PRIVILEGES;
var insertOne = "INSERT INTO plc_test(plc,create_time) VALUES ('%d',Now())";
var Msg = {
// @ts-ignore
"topic": util.format(insertOne, msg.payload)
}
return Msg;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。