spacebarchat / server

Spacebar server - A reimplementation of the Discord.com backend, built with Typescript and love
https://spacebar.chat
GNU Affero General Public License v3.0
1.49k stars 250 forks source link

MySQL Error #1112

Open f908 opened 8 months ago

f908 commented 8 months ago

Describe the bug MySQL node.js package has issue with the auth protocol

To Reproduce Steps to reproduce the behavior:

  1. Launch spacebar with "npm run start"
  2. See error

Expected behavior Successful spacebar server launch

Console Logs

(node:1419) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
    at Sequence._packetToError (/home/spacebar/server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Handshake.ErrorPacket (/home/spacebar/server/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
    at Protocol._parsePacket (/home/spacebar/server/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/home/spacebar/server/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/home/spacebar/server/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/home/spacebar/server/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/home/spacebar/server/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/home/spacebar/server/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (node:events:519:28)
    at Socket.emit (node:domain:488:12)
    --------------------
    at Protocol._enqueue (/home/spacebar/server/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Protocol.handshake (/home/spacebar/server/node_modules/mysql/lib/protocol/Protocol.js:51:23)
    at PoolConnection.connect (/home/spacebar/server/node_modules/mysql/lib/Connection.js:116:18)
    at Pool.getConnection (/home/spacebar/server/node_modules/mysql/lib/Pool.js:48:16)
    at /home/spacebar/server/node_modules/typeorm/driver/mysql/MysqlDriver.js:1014:18
    at new Promise (<anonymous>)
    at MysqlDriver.createPool (/home/spacebar/server/node_modules/typeorm/driver/mysql/MysqlDriver.js:1011:16)
    at MysqlDriver.connect (/home/spacebar/server/node_modules/typeorm/driver/mysql/MysqlDriver.js:305:36)
    at DataSource.initialize (/home/spacebar/server/node_modules/typeorm/data-source/DataSource.js:133:27)
    at initDatabase (/home/spacebar/server/dist/util/util/Database.js:83:67) {
  code: 'ER_NOT_SUPPORTED_AUTH_MODE',
  errno: 1251,
  sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',
  sqlState: '08004',
  fatal: true
}

System Information (please complete the following information):

Env and Software info

Additional context I already tried the mysql2 package, same error.

Puyodead1 commented 8 months ago

then change the server auth mode..?

f908 commented 8 months ago

then change the server auth mode..?

It worked before, that's why i don't understand it doesn't work now

TheArcaneBrony commented 6 months ago

Did you update MariaDB or change anything in it's configuration?