Created
March 6, 2014 09:58
-
-
Save lindenb/9386477 to your computer and use it in GitHub Desktop.
trying to connect to ucsc mysql with 'node.js'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
debug:true, | |
trace:true, | |
host : 'genome-mysql.cse.ucsc.edu', | |
port : 3306, | |
database: 'hg19', | |
user : 'genome', | |
password : '' | |
}); | |
connection.connect(function(err) {if(err!=null) console.log(err);}); | |
connection.end(); | |
/* | |
$ node ucsc01.js | |
{ [Error: connect ECONNREFUSED] | |
code: 'ECONNREFUSED', | |
errno: 'ECONNREFUSED', | |
syscall: 'connect', | |
fatal: true } | |
$ mysql -A -u genome -h genome-mysql.cse.ucsc.edu -P 3306 -D hg19 -e 'select now()' | |
+---------------------+ | |
| now() | | |
+---------------------+ | |
| 2014-03-06 01:56:36 | | |
+---------------------+ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment