I have installed MySQL and configure it, first I write the script as Arnav Sir has written but while running I am getting this error
PS E:\WebD with Node>
node .\mysql\mysql_scripts\create_table.js
{ Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Packet.asError (E:\WebD with Node\node_modules\mysql2\lib\packets\packet.js:684:17)
at ClientHandshake.execute (E:\WebD with Node\node_modules\mysql2\lib\commands\command.js:28:26)
at Connection.handlePacket (E:\WebD with Node\node_modules\mysql2\lib\connection.js:449:32)
at PacketParser.Connection.packetParser.p [as onPacket] (E:\WebD with Node\node_modules\mysql2\lib\connection.js:72:12)
at PacketParser.executeStart (E:\WebD with Node\node_modules\mysql2\lib\packet_parser.js:75:16)
at Socket.Connection.stream.on.data (E:\WebD with Node\node_modules\mysql2\lib\connection.js:79:25)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219: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’ }
I copied the code from github repo but still showing same error.