Reputation: 45
How to set up MySQL Database On Google Cloud SQL in NodeJs Application ? This will help you out setting up SQL database on google cloud to connect you nodejs application.
Upvotes: 0
Views: 951
Reputation: 45
module.exports = {
HOST: "<Include Instance IP Here from GCP SQL Dashboard>",
USER: "root", //Change user if you need by default root user
PASSWORD: "<Password>", // Enter Password you entered while creating instance
DB: "<DBName>", //Database name you want to connect with
// Leave As it is or configure according to your need
dialect: "mysql",
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
}
};
module.exports = {
HOST: "10.5.25.2",
USER: "root",
PASSWORD: "rootPassword",
DB: "testdb",
dialect: "mysql",
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
}
};
Upvotes: 1