Do you want to switch to Platzi in English?
4

How to connect to mysql?

I have installed sails-mysql with

npm install sails-mysql --save

and then add this code in config/datastores.js

adapter: require('sails-mysql'),
url: 'mysql://root:[email protected]:3306/ventas'

but when I do ‘sails lift’ I get this error

error: A hook (`orm`) failed to load!
error:error: { error:
   { Error:ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
    at Handshake.Sequence._packetToError (C:\Users\...\node_modules\mysql\lib\protocol\sequences\Sequence.js:48:14)

What can I do?

Escribe tu comentario
+ 2
1
115352Puntos

Are you sure that use te correct password?

0
30164Puntos
9 meses

yes! I even tried setting up another user and got the same error.

0
30164Puntos

By the way, I’m using mysql 8.0.11