C:\temp>mysql --version
mysql Ver 8.0.16 for Win64 on x86_64 (MySQL Community Server - GPL)
C:\temp>xmysql --version
undefined <-- that's a concern, I didn't have an errors when I installed it, but I did get some warnings:
C:\temp>npm install xmysql
npm WARN saveError ENOENT: no such file or directory, open 'C:\temp\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\temp\package.json'
npm WARN temp No description
npm WARN temp No repository field.
npm WARN temp No README data
npm WARN temp No license field.
xmysql@0.5.1
added 92 packages from 53 contributors and audited 109 packages in 4.487s
found 0 vulnerabilities
Generating REST APIs at the speed of your thought..
Cache init failed during database reading
{ Error: connect ETIMEDOUT
at PoolConnection.Connection._handleConnectTimeout (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\Connection.js:409:13)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at Socket._onTimeout (net.js:442:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
at Protocol._enqueue (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at PoolConnection.connect (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\Connection.js:116:18)
at Pool.getConnection (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\Pool.js:48:16)
at Pool.query (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\Pool.js:202:8)
at Xsql.dbCacheInitAsync (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\lib\xsql.js:31:15)
at Xsql.init (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\lib\xsql.js:23:10)
at Xapi.init (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\lib\xapi.js:35:16)
at startXmysql (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\bin\index.js:42:12)
at start (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\bin\index.js:89:5)
Xmysql took : 10 seconds
API's base URL : localhost:3000 <-- this looks wrong, I specified port 5000 because port 3000 wasn't responding when I call it from Postman
Notes:
I've verified that I can connect via mysql (taken from your previous answer to a question about a timeout error):
var mysql = require('mysql');
var pool = mysql.createPool({
connectionLimit : 10,
host : '10.10.4.25',
user : 'rfeldman',
password : '***',
database : 'pge3'
});
pool.query('SELECT 1 + 1 AS solution', function (error, results, fields) {
if (error) throw error;
console.log('The solution is: ', results[0].solution);
});
Versions:
C:\temp>node -v v10.16.0
C:\temp>npm -v 6.9.0
C:\temp>mysql --version mysql Ver 8.0.16 for Win64 on x86_64 (MySQL Community Server - GPL)
C:\temp>xmysql --version undefined <-- that's a concern, I didn't have an errors when I installed it, but I did get some warnings:
C:\temp>npm install xmysql npm WARN saveError ENOENT: no such file or directory, open 'C:\temp\package.json' npm WARN enoent ENOENT: no such file or directory, open 'C:\temp\package.json' npm WARN temp No description npm WARN temp No repository field. npm WARN temp No README data npm WARN temp No license field.
xmysql@0.5.1 added 92 packages from 53 contributors and audited 109 packages in 4.487s found 0 vulnerabilities
Steps to reproduce this issue:
C:\temp>xmysql -h 10.10.4.25 -u rfeldman -p *** -d pge3 -o 5000
Cache init failed during database reading { Error: connect ETIMEDOUT at PoolConnection.Connection._handleConnectTimeout (C:\Users\rfeldman\AppData\Roaming\npm\node_modules\xmysql\node_modules\mysql\lib\Connection.js:409:13) at Object.onceWrapper (events.js:286:20) at Socket.emit (events.js:198:13) at Socket._onTimeout (net.js:442:8) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)
errorno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', fatal: true } undefined
Database : pge3 Number of Tables : 0
REST APIs Generated : 5
Xmysql took : 10 seconds API's base URL : localhost:3000 <-- this looks wrong, I specified port 5000 because port 3000 wasn't responding when I call it from Postman
Notes:
I've verified that I can connect via mysql (taken from your previous answer to a question about a timeout error):
var mysql = require('mysql'); var pool = mysql.createPool({ connectionLimit : 10, host : '10.10.4.25', user : 'rfeldman', password : '***', database : 'pge3' });
pool.query('SELECT 1 + 1 AS solution', function (error, results, fields) { if (error) throw error; console.log('The solution is: ', results[0].solution); });
C:\temp>node qadb-pge3.js The solution is: 2