mysql test
This commit is contained in:
parent
7bde341f21
commit
2514f9b098
14
mysql.js
14
mysql.js
|
@ -1,12 +1,18 @@
|
|||
var mysql = require('mysql');
|
||||
const mysql = require('mysql');
|
||||
const config = require('./config');
|
||||
|
||||
|
||||
var con = mysql.createConnection({
|
||||
host: "test-db.verdnatura.es",
|
||||
user: "vicent",
|
||||
password: "llopis.19263"
|
||||
database: "vn",
|
||||
user: "alex",
|
||||
password: config.bdpassword
|
||||
});
|
||||
|
||||
con.connect(function(err) {
|
||||
if (err) throw err;
|
||||
if (err) {
|
||||
console.error('Error connecting: ' + err.stack);
|
||||
return;
|
||||
}
|
||||
console.log("Connected!");
|
||||
});
|
Reference in New Issue