I successfully ran my node.js file through mysql on local.
I want to run 24/7 my node.js so i decided to create google cloud vm instance.
installed mysql, node, unzip (via sudo apt-get update, sudo apt-get install mysql-server, sudo apt-get install unzip, sudo apt-get install -y nodejs)
and uploades my node.js zip file, then unziped my zip file, created mysql databse, added 'my google id'@'instance name', granted privileges.
I successfully installed 'npm install' but as soon as i typed 'node bin.js', below erros came out.
Error: connect ETIMEDOUT
at Connection._handleConnectTimeout (/home/myid/unzipfiles/node_modules/mysql/lib/Connection.js:419:13)
at Socket.g (events.js:292:16)
at emitNone (events.js:86:13)
at Socket.emit (events.js:185:7)
at Socket._onTimeout (net.js:338:8)
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
--------------------
at Protocol._enqueue (/home/myid/unzipfiles/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/home/myid/unzipfiles/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/home/myid/unzipfiles/node_modules/mysql/lib/Connection.js:130:18)
at Object.<anonymous> (/home/myid/unzipfiles/getting-acc/get-history.js:12:12)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
what should i do solve these problems?