ER_NOT_SUPPORTED_AUTH_MODE - MySQL server

前端 未结 11 838
旧时难觅i
旧时难觅i 2020-12-02 10:22

I have setup a MySQL database. When I try to access it through my Node JS server, I am getting the error

\"ER_NOT_SUPPORTED_AUTH_MODE: Client does no

11条回答
  •  离开以前
    2020-12-02 11:22

    I figured that in some MySQL versions they have the authentication for the establishment of a connection a bit messed. All I had to do was add the line "insecureAuth : true" to my connection attempt.

    var connection = mysql.createConnection({
      host     : 'localhost',
      user     : 'root',
      password : '********',
      database : 'vod_bill_database',
      insecureAuth : true
    }); 
    

    It is working fine now.

提交回复
热议问题