mysqlのデータベースに接続しようとすると以下のようなエラーが出てきます。この原因はなんなのでしょうか?
また、どのようにしたら解決できるのでしょうか?
var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'root', database : 'join_us' //the name of your db }); var q = 'SELECT CURTIME() as time, CURDATE() as date, NOW() as now'; connection.query(q, function (error, results, fields) { if (error) throw error; console.log(results[0].time); console.log(results[0].date); console.log(results[0].now); });
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/05/20 00:01