Sequelize ORM: How to connect to MYSQL on localhost, using the 'host' property?
up vote
1
down vote
favorite
I'm trying to connect to my local MYSQL(ran by XAMPP) through Sequelize: const sequelize = new Sequelize(process.env.MYSQL_DB, 'root', '', { host: process.env.CLEARDB_DATABASE_URL, dialect: 'mysql', logging: false }); The process.env.CLEARDB_DATABASE_URL variable is set to "localhost", just like the documentation says(i'm using this specific variable because i want to deploy to Heroku later) I'm getting the following error: getaddrinfo ENOTFOUND localhost'; localhost';:3306 The process.env.MYSQL_DB variable is just the name of my database. It all worked when i was using the "short way" to connect: var sequelize = new Sequelize(process.env.MYSQL_DB , "root", "", { dialect:'mysql', ...