Tagged Questions
0
votes
0answers
16 views
Inserting binary into MySQL from node.js
I'm using the crypto module to create salts and hashes for storage in my database. I'm using SHA-512, if that's relevant.
What I have is a 64 byte salt, presently in the form of a "SlowBuffer", ...
1
vote
1answer
27 views
Mysql “INSERT INTO” error throw with Node.js
I use the following code using mysql with Node.js
var mysql = require('mysql');
var db = mysql.createConnection({host:'localhost', user:'root', password: 'pw', database: 'db'});
db.connect();
And, ...
0
votes
0answers
30 views
Widget deployment in PHP that integrates charts
I want to deploy a widget, which will produce a piece of HTML that user will paste into their website to access a specific piece of my website.
As this the first time that I will do something like ...
0
votes
2answers
25 views
What are benefits and drawbacks of Math.floor(Date.now() / 1000) UINT vs Date.now() UBIGINT [on hold]
So I got an app in which I store the time that a product was added in my mysql db.
I can go two ways:
Math.floor(Date.now() / 1000)
and save it as an UINT in mysql.
OR
Date.now()
and save it ...
-1
votes
0answers
4 views
Compund.js Database Add / update / Delete example
Is there any example code script that use - compound.js + node.js + express.js
and implement Database connection along with add/ edit / delete operation and also use AJAX ?
0
votes
0answers
10 views
Verify UBIGINT in node.js
I'm developing an app in node js and want to verify that a user-supplied value is a valid MySQL UBIGINT.
I've looked around but couldn't find a clear answer to do this in node.js!
0
votes
0answers
31 views
JavaScript (Node.js) — retrieving date from MySQL column is a day behind
I have a Node.js server running as an API server for a service I'm working on for a company.
The MySQL server it connects to stores dates for when an event starts, insertion works perfectly and you ...
0
votes
1answer
22 views
Nodejs mysql module not connecting to database
I'm trying to do a simple test query to get the node mysql module working but it's not connecting to the database.
Here's my code in app.js:
var http = require('http'),
io = ...
0
votes
1answer
29 views
sequelize.js - You need to install mysql package manually
After installing node.js and sequelize.js, and running a basic test, the message "You need to install mysql package manually" is displayed.
I've tried searching the web and Stackoverflow for the ...
1
vote
0answers
33 views
Real-time update to NodeJS(MVC, Express), Mysql and Socket.io application
I'm trying to create a real time web application with NodeJS with an MVC layout using the Express framework and MySQL as my back end data store.
The problem that I've run into is that I can't find ...
1
vote
1answer
18 views
How to set a web service on AMAZON (AWS) which is running a NODEJS server?
Hi Everyone !
How to set up the connection between client (eg:MY Mobile browser) and the AWS Server which is running NODE server on it?
Is Web service is required?
If so which one?
How to set up ...
1
vote
0answers
27 views
Compoundjs fails to run with jugglingdb-mysql
Trying to test compoundjs with mysql but it fails.
My system is Debian 7 with following versions of nodejs & npm
$ node -v
v0.10.13
$ npm -v
1.3.4
Here is how I installed compoundjs
sudo ...
0
votes
1answer
34 views
How to access mysql database with socket.io
I'm just getting into coding server side javascript and have been reading tutorials on socket.io and node.js, but I haven't come across anything demonstrating how to use node.js to access a mysql ...
-3
votes
2answers
53 views
Let Node.js and PHP use the same database(mysql)? [closed]
I built a application using PHP, and I want to make my application have a real-time service. So, I use socket.io with Node.js. But, how to let Node.js and PHP use the same database(mysql)?
0
votes
0answers
24 views
sails-mysql schema datatypes
anyone used node's sails framework using mysql as DB (https://github.com/balderdashy/sails-mysql)?
I am stuck in models, I can't create the database structure.The datatypes that need to use to create ...
0
votes
1answer
53 views
nodejs mysql amazing row duplicates
I have problem for node.js.
I read data for socket, using dgram.createSocket('udp4').
I parse data and write to mysql db (use https://npmjs.org/package/mysql) with code:
var result = {
...
0
votes
1answer
29 views
NodeJS with mysql returning the first query result
I have a NodeJS with Express and mysql. I have put an Generic sql function so I call it for multiple times:
exports.selectCommand=function(table,cols,cond){
var connection = ...
-1
votes
1answer
28 views
Filesystem backend
I am building an project where users can store files. They can also create folders in them. I am going to use AWS S3 for storing the files. These files can be shared with other users also. Now looking ...
0
votes
1answer
64 views
How to show data from mysql in nodejs with a refresh rate
I'd like to show data from mysql using nodejs with a refresh rate. I've done following coding and getting result. But the problem is if i open localhost:8000/?id=1 on browser in one tab it's showing ...
0
votes
1answer
27 views
Querying multiple rows using node-mysql
This issue pertains to node-mysql.
I seem to be having a problem with the following code, and it seems to be related to the use of user defined variables. The rendered query runs fine inside of any ...
0
votes
2answers
53 views
Can't connect to localhost database from node.js server
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 ...
0
votes
1answer
23 views
Nodejs mysql query not executing
Im trying to use node.js for the creation of a mysql database and tables.
The query i want to execute is:
CREATE DATABASE NodeTest;USE NodeTest;CREATE TABLE tblUsers (userId varchar(32), userName ...
0
votes
1answer
13 views
Node.js http with mysql pooling quits unexpectedly on error
So I started to try node.js this morning and was able to come-up with a http service that handles path requests and can connect to mysql with pooling for multiple transactions.
I am just having ...
0
votes
1answer
34 views
SELECT not working in node.js
I'm trying to use a SELECT query on my SQL database using node.js, the SELECT query below should work but doesn't. This is weird because I think this should work but it doesn't even enter the ...
0
votes
1answer
24 views
Acces database from appfog's node.js server (Database settings)
I'm trying to connect to a database using a node.js server both hosted on appfog.com using these settings:
var client = mysql.createConnection({
host: 'mysql-node01.eu-west-1.aws.af.cm',
user: ...
1
vote
0answers
81 views
nodejs & socket.io vs php - auth & integrate to php app
Please, I need a push (or kick) because I am feeling lost.
I have to write some kind of portal, which I would like to do by using php+mysql via ajax.
There is no problem with that, but part of the ...
0
votes
0answers
15 views
Establish Pool Connection in node-mysql
How to establish pool connection in node-mysql?
Can anyone provide me the syntax?
0
votes
1answer
51 views
Using arbitrary mySQL Query with JugglingDB?
I am currently using juggling db with NodeJS for ORM. I now need to do some reporting, which involves joining data from several tables using arbitrary SQL with SUM and GROUP BY too. How would I do ...
0
votes
1answer
25 views
Node.js orm2 create elements in loop
My code inserts two times the same values from array (last one). Why ? How to insert many rows but only if they doesn't exists ?
for x of species # two elements 36 and 37
data = { ...
0
votes
1answer
94 views
Nodejs Express MySQL Session store
I've been using connect-mysql-session for storing sessions in a MySQL db, but it's not being maintained anymore and have not been updated for 2 years.
Are there any other mysql session store modules ...
2
votes
2answers
64 views
how many worker threads in nodejs?is it possible to modify the number for better performance?
As far as I know, nodejs is not single threaded. In the background,a worker threadpool is looping for executing long io tasks that can't finished by epoll etc.
But how many threads in the background? ...
0
votes
0answers
22 views
cant connect to mysql via sequelize
Hi im trying to connect to my mysql db via sequelize but to no avail..
The connection data i giving is 100% corrent and i can connect to my mysql db via phpmyadmin
here is my code..
var Sequelize ...
0
votes
2answers
66 views
MongoDB for small datasets
Are there any benefits to using MongoDB for a Node.js application rather than a traditional SQL database such as MySQL, if I'm not planning to have large (>1000 item) collections and am already ...
0
votes
0answers
38 views
Node.js express.js mysql eat a lot of memory
Each controller in my app inherits from main controller when the mysql connection is creating. The code:
mysql = require('mysql')
exports.Controller = class Controller
req: null
res: ...
0
votes
1answer
32 views
module MySQL nodejs
I have a problem with the mysql module
this is is my part of code for testing connection :
var express = require('express');
var mysql = require('mysql');
var fs = require('fs');
var app = express()
...
1
vote
0answers
26 views
nodejs mysql (libmysqlclient)
I use https://github.com/calzoneman/sync project and get this error. I'm new to nodejs. How to fix this?
I done all in installation manual
root@srv:/var/www/synch# node server.js
Starting CyTube ...
0
votes
2answers
24 views
Store Series of 0s and 1s in MySQL database
I'm using MySql and Nodejs. I need to store a huge string made of only 0s and 1s. (This is a map grid. 0 = Can Move, 1 = Can't move.)
Ex: ...
1
vote
2answers
72 views
Node.js, Request, MySQL and Connection Pooling leads to Infinite Blocking/Freezing Behavior?
I'm working on a service that connects to a REST service, gets a response, transforms it and writes it to a database. I was originally using a flat file in my proof of concept, and everything worked ...
1
vote
1answer
45 views
Node.js with AWS Load Balancing
I'm just about to build a chat application and I'm keen to use node.js (would be my first time using it).
I'm using Amazon ELB (no stickyness) with Multiple Linux EC2 instances (apache) and one mysql ...
0
votes
1answer
24 views
Returning a column with node-mysql (like fetchColumn in PDO)
Is there any way to return a single column with node-mysql? I'm looking for something analogous to fetchColumn in PDO.
For example, say I have the following query:
database.query("SELECT id FROM ...
0
votes
1answer
31 views
How to have SQL query results returned and stored in localhost window variable, rather than the terminal, using Node.js?
I'm fairly new to Web Development and this is my first attempt at querying a DB and actually doing something with the data returned.
I'm using Node.js to query a Database
I have the following app.js ...
0
votes
2answers
38 views
Where should be located a database config file in Node.js and Express?
I'm now learning Node.js and Express, and want to call mysql module to render multiple unique pages, so instead of writing out var connection=mysql.createConnection({user:'root', password: ...
0
votes
1answer
23 views
Using Sequelize along with ActiveRecord
I'm working on a project in which we have a main website developed using RoR and, in the other hand, we have a NodeJS server receiving/sending information. Both platforms use the same MySQL database, ...
2
votes
1answer
160 views
Node.js MySQL Needing Persistent Connection
I need a persistent MySQL connection for my Node web app. The problem is that this happens about a few times a day:
Error: Connection lost: The server closed the connection.
at Protocol.end ...
0
votes
1answer
90 views
db URL works in MySQL Workbench, but not node.js (getaddrinfo ENOTFOUND)
I've set up a MySQL db in Heroku, and successfully connected to it via MySQL Workbench.
I've been using felixge's node-mysql plugin to try and connect to it from my app (written in coffeescript), set ...
1
vote
1answer
22 views
How to wrap values within % % placefolder in mysql module in node.js?
Is there any way to write some queries such as this in mysql module in Node.js?
select * from table_name where name like "%value%";
In Node.js, you can use ? placeholder in order to put some values ...
0
votes
0answers
60 views
Autocomplete with nodejs , mysql , sphinx for a large dataset (~50k)
I have a large dataset which is stored in a mysql table , it contains only two fields , id and name , id is a primary key and name has a unique index . I used sphinx as an indexer , and i am querying ...
0
votes
0answers
27 views
Node.JS Ensure Config File Ready
I have a config.js file for Node that I have set user data, database connection data, and IP address for the server. As I am working in multiple environments I have configured the config.js file to ...
0
votes
2answers
115 views
Which's the best DB(NoSQL or regular SQL) to choose using Node.js? [closed]
I've read that there are more information about using MongoDB with Node.js rather than MySQL and that is a concern for me, because I'm used to work with MySQL. In terms of development and performance ...
0
votes
1answer
44 views
Caching mysql database with node.js
I need to provide a caching layer for mysql database on my node.js server app.
The caching should be able to hold array objects (not just a key-value store).
What module should I use for it ?
...