I know this question has been answered, but for me the problem was that the mysql server listens on a Unix socket not on a tcp socket. So the solution was to add:
port: '/var/run/mysqld/mysqld.sock'
to the connection options.
More Related Contents:
- How can i write in NodeJS with MongoDB the following MySQL Select?
- MySQL 8.0 – Client does not support authentication protocol requested by server; consider upgrading MySQL client
- MySQL with Node.js
- node-mysql multiple statements in one query
- nodejs mysql Error: Connection lost The server closed the connection
- How do I do a bulk insert in mySQL using node.js
- Node.js can’t authenticate to MySQL 8.0
- How to auto generate migrations with Sequelize CLI from Sequelize models?
- How to access a RowDataPacket object
- Retrieve last inserted id with Mysql
- How to pass parameters to mysql query callback in nodejs
- Making changes to multiple records based on change of single record with SQL
- node.js + mysql connection pooling
- connect ECONNREFUSED – node js , sql
- How to make join queries using Sequelize on Node.js
- NodeJS MySQL Dump
- Node.js connect to MySQL Docker container ECONNREFUSED
- Use promise to process MySQL return value in node.js
- NodeJS responded MySQL timezone is different when I fetch directly from MySQL
- Error in MySQL library for Node.js
- Which ORM should I use for Node.js and MySQL? [closed]
- find number of rows in returned mysql result (nodejs)
- MySQL giving “read ECONNRESET” error after idle time on node.js server
- Counting associated entries with Sequelize
- INSERT INTO fails with node-mysql
- MySQL – Trigger for updating same table after insert
- How to get the difference in years from two different dates?
- Error Code: 1406. Data too long for column – MySQL
- Does mysql have the equivalent of Oracle’s “analytic functions”?
- #1060 – Duplicate column name ‘id’