ALL报错解决汇总
本文最后更新于872 天前,其中的信息可能已经过时,如有错误请评论留言

远程连接MySQL报错

报错内容:Client does not support authentication protocol requested by server; consider upgrading MySQL client

报错原因:MySQL8.0以后的版本加密方式与之前不同,8.0.11换了新的身份验证插件:caching_sha2_password,以前的为mysql_native_password

解决方法:

            1. 登录数据库后,查看'root'用户身份验证插件:
   * use mysql;
   * select user,plugin,host from user where user='root';
            2. 改变身份验证插件(加密方式)
   - alter user 'root'@'localhost' identified with mysql_native_password by '277882';
            3. 最后重新查看加密方式(身份验证插件)
   - select user,plugin from user where user='root';

node-express报错

报错内容:expressJWT is not a function

报错原因:express高版本代码书写与过去低版本不同,新版需要配置algorithms算法,一般默认值为HS256

解决方法:

  • 代码改成:
app.use(expressJWT.expressjwt({ secret: secretKey, algorithms: ["HS256"] }).unless({ path: [/^\/api\//] }))

山水有相逢,我们江湖再见!じゃな~
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇