Sql error-> client does not support authentication protocol

Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Packet.asError (/Users/ritviknagpal/Desktop/web development CB/practice/sql_use/node_modules/mysql2/lib/packets/packet.js:684:17)
at ClientHandshake.execute (/Users/ritviknagpal/Desktop/web development CB/practice/sql_use/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/Users/ritviknagpal/Desktop/web development CB/practice/sql_use/node_modules/mysql2/lib/connection.js:449:32)
at PacketParser.onPacket (/Users/ritviknagpal/Desktop/web development CB/practice/sql_use/node_modules/mysql2/lib/connection.js:72:12)
at PacketParser.executeStart (/Users/ritviknagpal/Desktop/web development CB/practice/sql_use/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket. (/Users/ritviknagpal/Desktop/web development CB/practice/sql_use/node_modules/mysql2/lib/connection.js:79:25)
at Socket.emit (events.js:200:13)
at addChunk (_stream_readable.js:290:12)
at readableAddChunk (_stream_readable.js:271:11)
at Socket.Readable.push (_stream_readable.js:226:10) {
code: ‘ER_NOT_SUPPORTED_AUTH_MODE’,
errno: 1251,
sqlState: ‘08004’,
sqlMessage: 'Client does not support authentication protocol ’ +
'requested by server; consider upgrading MySQL ’ +
‘client’
}
this error is coming in my basic js programme to add data in database

Use mysql 5.7⠀⠀⠀⠀⠀⠀⠀

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.