node-mysql Questions

4

Solved

I've built my app so far using node-mysql. I just set up a securely accessible mysql database using AWS RDS service and have tested an SSL connection successfully with the mysql command line client...
Popelka asked 8/10, 2012 at 22:12

3

Solved

Query: select id, event_time from events where event_time > 1395797406712 and event_time < 1398389406712 order by event_time asc. this query returns ~25k rows (500KB in total size). When I...

2

Solved

The documentation states that you can either use the pool directly with: pool.query(); or get a connection manually and then run a query: pool.getConnection(function(err, connection) { // Use ...
Induration asked 21/5, 2014 at 12:44

8

I am using node-mysql, node-js, and Q promises. I have successfully updated, deleted, and inserted single rows using the above. As well as inserted multiple rows in a single statement in my test c...
Boart asked 28/8, 2014 at 15:2

4

My node.js app gives 5xx due to connection timeouts at random times. Here's how I connect and query: var mysql = require('mysql'); var config = { host: '172.10.1.1', port: 3306, user: 'user', ...
Iota asked 22/9, 2015 at 11:7

4

I'm on a shared hosting platform and would like to throttle the queries in my app so that if the total execution time exceeds a certain amount over a variable time period then I can make the app co...
Eastwood asked 1/10, 2014 at 12:15

5

Solved

I'm running a Node server connecting to MySQL via the node-mysql module. Connecting to and querying MySQL works great initially without any errors, however, the first query after leaving the Node s...
Aulic asked 6/4, 2014 at 22:43

2

Solved

I get Error Too many connections when there to much items in a loop with INSERT IGNORE INTO. function insertCases(cases) { for(var i in cases) { var thequery = 'INSERT IGNORE INTO `cases` SET ke...
Address asked 16/1, 2019 at 13:34

2

Solved

I want to write an SQL query that contains a NodeJS variable. When I do this, it gives me an error of 'undefined'. I want the SQL query below to recognize the flightNo variable. How can a NodeJS v...
Intercurrent asked 15/12, 2016 at 16:28

2

I don't know why mysql.end() or mysql.destroy() are not working as i expect. This is my code. var mysql = require('mysql'); var connection = mysql.createConnection({ host: 'localhost', user: 'ro...
Inweave asked 11/5, 2015 at 8:1

9

Solved

I have a python background and is currently migrating to node.js. I have problem adjusting to node.js due to its asynchronous nature. For example, I am trying to return a value from a MySQL functi...
Feign asked 11/4, 2016 at 11:22

2

Solved

Am sure this is fairly obvious, to me it would make more sense if the second double question mark in the example was a single one. From their docs: Alternatively, you can use ?? characters as pla...
Suborbital asked 26/5, 2015 at 11:20

5

Solved

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 examp...
Haigh asked 3/4, 2013 at 3:55

7

Solved

I'm using node-mysql and most of the queries. Working. some queries not working. I tried every version of Node (from 0.5...) until (5.6.0), I also tried (4.0) and (4.1), Nothing helps. I tried to ...
Isobelisocheim asked 22/2, 2016 at 12:16

6

Solved

How do escape a MySQL LIKE statement in node-mysql? Something along the lines of "SELECT * FROM card WHERE name LIKE '%" + connection.escape(req.body.search) + "%'" Results in 'SELECT * FROM ...
Sweetmeat asked 29/7, 2013 at 11:14

3

Solved

I want to insert multiple rows into mysql thru node.js mysql module. The data I have is var data = [{'test':'test1'},{'test':'test2'}]; I am using pool pool.getConnection(function(err, connec...
Raymonderaymonds asked 22/6, 2014 at 7:20

7

Been having a lot of trouble trying to connect to to my localhost database. I've tried using the mysql and mysql-simple node modules but in both cases I just can't get it to connect. Here's what I ...
Audra asked 5/7, 2013 at 16:22

4

Solved

I 'am trying to insert some data with Node.js. I installed mysql support with npm . I just checked arround some source code, I've wrote following code , I can follow sql output in console.log and S...
Anteversion asked 13/8, 2013 at 14:8

2

Solved

I'm discovering Nodejs and the node-mysql module. I have a small problem. Every tutorial that I find explain how to do a select on the database but they never return the rows, they always log them,...
Zosema asked 28/4, 2013 at 14:59

3

I am using ( SequelizeJs + NodeJs + Mysql ) in my project Whenever I start the project I want to check the database exists or not and then if it's not there I want to create a new one. I tried this...
Derron asked 22/7, 2019 at 12:18

3

Solved

I am trying to change database in an existing connection in node. The connection may or may not have database name in createConnection call. Here's the code: var mysql = require('mysql'); connec...
Semite asked 9/4, 2015 at 4:43

2

Solved

I am currently using the node-mysql library to connect my application to a MySQL instance. After reading some other StackOverflow questions and articles I found, it sounds like node-mysql automatic...
Owings asked 4/8, 2014 at 21:41

6

Does anyone know how to use SELECT WHERE IN in node-mysql? I've tried the code below, but I get the following error message: 'You have an error in your SQL syntax; check the manual that correspon...
Schumer asked 14/6, 2012 at 20:57

1

Ever since running as suggested: https://mcmap.net/q/53951/-mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client alter user 'root'@'localhos...
Stylo asked 21/1, 2021 at 23:44

1

Solved

Quick question If I make a node cluster application with 4 workers (4 instances of my application), should I use mySQL pool or mysql pool cluster? If I use pool it will create one pool for each app...
Haematogenous asked 12/7, 2017 at 22:9

© 2022 - 2025 — McMap. All rights reserved.