Skip to main content

All Questions

Tagged with
782 votes
35 answers
1.1m views

MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

I can't make a simple connection to the server for some reason. I install the newest MySQL Community 8.0 database along with Node.JS with default settings. This is my node.js code var mysql = ...
Pig 's user avatar
  • 7,925
384 votes
9 answers
320k views

MySQL with Node.js

I've just started getting into Node.js. I come from a PHP background, so I'm fairly used to using MySQL for all my database needs. How can I use MySQL with Node.js?
crawf's user avatar
  • 9,568
341 votes
4 answers
232k views

Which ORM should I use for Node.js and MySQL? [closed]

I'm rewriting a project to use Node.js. I'd like to keep using MySQL as the DB (even though I don't mind rewriting the schema). I'm looking for a simple-to-use, reasonable-performance ORM, which ...
Near Privman's user avatar
  • 3,760
188 votes
21 answers
514k views

How to update a record using sequelize for node?

I'm creating a RESTful API with NodeJS, express, express-resource, and Sequelize that is used to manage datasets stored in a MySQL database. I'm trying to figure out how to properly update a record ...
a_arias's user avatar
  • 3,086
180 votes
15 answers
239k views

How do I do a bulk insert in mySQL using node.js

How would one do a bulk insert into mySQL if using something like https://github.com/felixge/node-mysql
crickeys's user avatar
  • 3,095
171 votes
5 answers
334k views

How to make join queries using Sequelize on Node.js

I am using sequelize ORM; everything is great and clean, but I had a problem when I use it with join queries. I have two models: users and posts. var User = db.seq.define('User',{ username: { ...
Jose Sosa's user avatar
  • 2,227
144 votes
5 answers
124k views

How to make Sequelize use singular table names

I have an model called User but Sequelize looks for the table USERS whenever I am trying to save in the DB. Does anyone know how to set Sequelize to use singular table names? Thanks.
user avatar
134 votes
11 answers
261k views

How to auto generate migrations with Sequelize CLI from Sequelize models?

I have a set of Sequelize models. I want to use migrations, not DB Sync. Sequelize CLI seems to be able to do this, according to this article: "When you use the CLI for the model generation, you will ...
Michael Schmidt's user avatar
122 votes
6 answers
188k views

nodejs mysql Error: Connection lost The server closed the connection

when I use node mysql, an error is appear between 12:00 to 2:00 that the TCP connection is shutdown by the server. This is the full message: Error: Connection lost: The server closed the connection. ...
jackieLin's user avatar
  • 1,277
114 votes
5 answers
133k views

sequelize table without column 'id'

I have the following sequelize definition of a table: AcademyModule = sequelize.define('academy_module', { academy_id: DataTypes.INTEGER, module_id: DataTypes.INTEGER, ...
Marc Rasmussen's user avatar
112 votes
5 answers
211k views

Preventing SQL injection in Node.js

Is it possible to prevent SQL injections in Node.js (preferably with a module) in the same way that PHP had Prepared Statements that protected against them. If so, how? If not, what are some examples ...
funseiki's user avatar
  • 9,397
105 votes
8 answers
192k views

node.js + mysql connection pooling

I'm trying to figure out how to structure my application to use MySQL most efficent way. I'm using node-mysql module. Other threads here suggested to use connection pooling so i set up a little module ...
kasztelan's user avatar
  • 1,761
103 votes
17 answers
204k views

How to access a RowDataPacket object

I'm currently developing a desktop application with Node-webkit. During that process I need to get some data from a local MySQL-database. The querying works fine, but I can't figure out how to access ...
paK0's user avatar
  • 2,548
92 votes
4 answers
131k views

Specifying specific fields with Sequelize (NodeJS) instead of *

Alright so I have a project in NodeJS where I'm utilizing Sequelize for a MySQL ORM. The thing works fantastically however I'm trying to figure out if there is a way to specify what fields are being ...
Aric's user avatar
  • 1,377
91 votes
4 answers
143k views

node-mysql multiple statements in one query

I'm using nodejs 10.26 + express 3.5 + node-mysql 2.1.1 + MySQL-Server Version: 5.6.16. I got 4 DELETE's and want only 1 Database Request, so i connected the DELETE commands with a ";"... but it ...
L.rp's user avatar
  • 933

15 30 50 per page
1
2 3 4 5
796