CONSTのMySQL =(必要' のMySQL ' ) CONST CON = mysql.createConnection({ ホスト:' localhostの' 、 ユーザー:「ルート」、 パスワード:' ****** ' 、 ポート:' 3306 ' 、 データベース:' myblog ' }) con.connect() constの SQL = " ユーザーから*選択します。' con.query(SQL、(ERR、結果) => { 場合(ERR){ console.error(ERR) リターン } console.log(結果) }) con.end()
データベース接続ノードのMySQL
おすすめ
転載: www.cnblogs.com/hack-ing/p/12027391.html
ランキング