walinejs / waline

💬 A Simple, Safe Comment System
https://waline.js.org/en/
GNU General Public License v2.0
2.29k stars 404 forks source link

[Bug]: 似乎 mysql8 登录方式不支持,提示要升级 mysql-client || [Bug]: It seems that the mysql8 login method is not supported, prompting to upgrade mysql-client #2119

Closed alomerry closed 1 year ago

alomerry commented 1 year ago

问题描述 | Describe the bug

似乎 mysql8 登录方式不支持,提示要升级 mysql-client

log ```log [2023-10-13T10:20:04.138] [1] [INFO] - Server running at http://127.0.0.1:8360 [2023-10-13T10:20:04.138] [1] [INFO] - ThinkJS version: 3.2.15 [2023-10-13T10:20:04.139] [1] [INFO] - Environment: production [2023-10-13T10:20:04.139] [1] [INFO] - Workers: 1 Error: Cannot find module '/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node' Require stack: - /app/node_modules/sqlite3/lib/sqlite3-binding.js - /app/node_modules/sqlite3/lib/sqlite3.js - /app/node_modules/think-model-sqlite/lib/socket.js - /app/node_modules/think-model-sqlite/lib/query.js - /app/node_modules/think-model-sqlite/index.js - /app/node_modules/@waline/vercel/src/config/adapter.js - /app/node_modules/think-loader/loader/config.js - /app/node_modules/think-loader/index.js - /app/node_modules/thinkjs/lib/loader.js - /app/node_modules/thinkjs/lib/application.js - /app/node_modules/@waline/vercel/vanilla.js at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/app/node_modules/sqlite3/lib/sqlite3-binding.js:4:17) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/loader:1143:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/node_modules/sqlite3/lib/sqlite3-binding.js', '/app/node_modules/sqlite3/lib/sqlite3.js', '/app/node_modules/think-model-sqlite/lib/socket.js', '/app/node_modules/think-model-sqlite/lib/query.js', '/app/node_modules/think-model-sqlite/index.js', '/app/node_modules/@waline/vercel/src/config/adapter.js', '/app/node_modules/think-loader/loader/config.js', '/app/node_modules/think-loader/index.js', '/app/node_modules/thinkjs/lib/loader.js', '/app/node_modules/thinkjs/lib/application.js', '/app/node_modules/@waline/vercel/vanilla.js' ] } Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client at Handshake.Sequence._packetToError (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Handshake.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18) at Protocol._parsePacket (/app/node_modules/mysql/lib/protocol/Protocol.js:291:23) at Parser._parsePacket (/app/node_modules/mysql/lib/protocol/Parser.js:433:10) at Parser.write (/app/node_modules/mysql/lib/protocol/Parser.js:43:10) at Protocol.write (/app/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket. (/app/node_modules/mysql/lib/Connection.js:88:28) at Socket. (/app/node_modules/mysql/lib/Connection.js:526:10) at Socket.emit (node:events:517:28) at Socket.emit (node:domain:489:12) -------------------- at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48) at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23) at PoolConnection.connect (/app/node_modules/mysql/lib/Connection.js:116:18) at Pool.getConnection (/app/node_modules/mysql/lib/Pool.js:48:16) at /app/node_modules/think-helper/index.js:83:10 at new Promise () at /app/node_modules/think-helper/index.js:82:12 at ThinkMysql.getConnection (/app/node_modules/think-mysql/index.js:89:69) at /app/node_modules/think-mysql/index.js:229:21 at /app/node_modules/think-debounce/index.js:19:16 { 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 } ```

image

问题网站 | Website URL

https://waline.alomerry.com

服务部署在哪里? | Where your waline deploy?

Self Host

数据存储在哪里?| Where your comment data store?

MySQL


Problem description | Describe the bug

It seems that the mysql8 login method is not supported, prompting to upgrade mysql-client

log ```log [2023-10-13T10:20:04.138] [1] [INFO] - Server running at http://127.0.0.1:8360 [2023-10-13T10:20:04.138] [1] [INFO] - ThinkJS version: 3.2.15 [2023-10-13T10:20:04.139] [1] [INFO] - Environment: production [2023-10-13T10:20:04.139] [1] [INFO] - Workers: 1 Error: Cannot find module '/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node' Require stack: - /app/node_modules/sqlite3/lib/sqlite3-binding.js - /app/node_modules/sqlite3/lib/sqlite3.js - /app/node_modules/think-model-sqlite/lib/socket.js - /app/node_modules/think-model-sqlite/lib/query.js - /app/node_modules/think-model-sqlite/index.js - /app/node_modules/@waline/vercel/src/config/adapter.js - /app/node_modules/think-loader/loader/config.js - /app/node_modules/think-loader/index.js - /app/node_modules/thinkjs/lib/loader.js - /app/node_modules/thinkjs/lib/application.js - /app/node_modules/@waline/vercel/vanilla.js at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/app/node_modules/sqlite3/lib/sqlite3-binding.js:4:17) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/loader:1143:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/node_modules/sqlite3/lib/sqlite3-binding.js', '/app/node_modules/sqlite3/lib/sqlite3.js', '/app/node_modules/think-model-sqlite/lib/socket.js', '/app/node_modules/think-model-sqlite/lib/query.js', '/app/node_modules/think-model-sqlite/index.js', '/app/node_modules/@waline/vercel/src/config/adapter.js', '/app/node_modules/think-loader/loader/config.js', '/app/node_modules/think-loader/index.js', '/app/node_modules/thinkjs/lib/loader.js', '/app/node_modules/thinkjs/lib/application.js', '/app/node_modules/@waline/vercel/vanilla.js' ] } Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client at Handshake.Sequence._packetToError (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Handshake.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18) at Protocol._parsePacket (/app/node_modules/mysql/lib/protocol/Protocol.js:291:23) at Parser._parsePacket (/app/node_modules/mysql/lib/protocol/Parser.js:433:10) at Parser.write (/app/node_modules/mysql/lib/protocol/Parser.js:43:10) at Protocol.write (/app/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket. (/app/node_modules/mysql/lib/Connection.js:88:28) at Socket. (/app/node_modules/mysql/lib/Connection.js:526:10) at Socket.emit (node:events:517:28) at Socket.emit (node:domain:489:12) ------------------- at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48) at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23) at PoolConnection.connect (/app/node_modules/mysql/lib/Connection.js:116:18) at Pool.getConnection (/app/node_modules/mysql/lib/Pool.js:48:16) at /app/node_modules/think-helper/index.js:83:10 at new Promise () at /app/node_modules/think-helper/index.js:82:12 at ThinkMysql.getConnection (/app/node_modules/think-mysql/index.js:89:69) at /app/node_modules/think-mysql/index.js:229:21 at /app/node_modules/think-debounce/index.js:19:16 { 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 } ```

image

Question Website | Website URL

https://waline.alomerry.com

Where is the service deployed? | Where your waline deploy?

Self Host

Where is the data stored? | Where your comment data store?

MySQL

lizheming commented 1 year ago

https://github.com/thinkjs/thinkjs/issues/1354 默认是不支持 MySQL 8。不过可以参考下这个 issue 修改下 MySQL 的默认认证加密方式可以适配上。

alomerry commented 1 year ago

thinkjs/thinkjs#1354 默认是不支持 MySQL 8。不过可以参考下这个 issue 修改下 MySQL 的默认认证加密方式可以适配上。

好的,感谢~