I know two ways to solve it:
-
In
mysql.conf
, commentskip-networking
. -
Try to set the socket like this:
var client = mysql.createClient({ user: uuuu, password: pppp, host: '127.0.0.1', port: '3306', _socket: '/var/run/mysqld/mysqld.sock',});
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
- node.js mysql error: ECONNREFUSED
- 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
- 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
- Access denied for user ‘root@localhost’ (using password:NO)
- Duplicating a MySQL table, indices, and data
- Laravel Eloquent group by most recent record
- Database returned an invalid value in QuerySet.dates()
- Access to mysql container from other container