kotlin declare variables to remove the question mark (?) Use keyword Lateinit

2023-01-26  

  1. error message:Client does not support authentication protocol requested by server; consider upgrading MySQL client
    请添加图片描述
  2. solution
    Open the dbeaver and run the following SQL
    Alter user 'root'@'localhost' identify with mysql_native_password by ';
  3. Run node.js again, successfully connect to the database
const mySql = require('mysql')
const db = mySql.createConnection({
    
    host: "localhost",
    user: "root",
    password: "19980404",
    database: "sys"
})
db.connect()
db.query('select * from user', (err, data) => {
    
    if(err) {
    
        console.log(err);
        return console.log('query failed')
    }
    console.log(data);
})

source

Related Posts

IOS memory management and malloc source code interpretation

bzoj 2458 bepijing2011 minimum triangle calculation geometry+division

MVVM’s beginner in Android

OpenGL Linux installation and configuration one -key compilation+operation

kotlin declare variables to remove the question mark (?) Use keyword Lateinit

Random Posts

ESP8266 WIFI module learning road (5) -Android mobile phone debugging assistant communicates with single -chip microcomputers

IOS development III controller use and custom label barbar The concept of

Center 7.5 Install Tomcat+JDK+MySQL (Simple Installation of YUM)

Sorting method (C ++)

RTSP protocol video intelligent monitoring platform Easynvr uses mysql as a data source to start an error of the Unknow Driver “mysql”