0.0.3 • Published 2 years ago
sequelize-mysql-ssh v0.0.3
Description
Here's the translation of your previous message:
SequelizeusescloneDeepin the configuration, which causes somestreamto be unreadable.- After initialization,
Sequelizedoes not provide a method to passstreamduring subsequent execution.
Therefore, we made some small changes to the Sequelize source code.
Install
Using npm:
npm install sequelize-mysql-sshOr using yarn:
yarn add sequelize-mysql-sshUsage
const config = {
host: "", //数据库远程地址
username: "", //数据库用户名
database: "", //数据库
password: "", //数据库密码
dialect: "mysql",
ssh: {
host: "", //远程主机地址
port: 22, //主机端口
username: "", //主机用户名
password: "", //主机密码
},
};
const sequelize = new Sequelize(config);
sequelize.query("select * from table").then((data) => {
console.log("=====>", data);
});MIT License
Copyright (c) 2014-present Sequelize contributors