【MySQL】MySQL 8報錯 Unknown initial character set index 255 received from server. Initial client char

在這裏插入圖片描述

1.背景

背景請參考:【MySQL】MySQL 8 IDEA連接本地MySQL報錯 Host DESKTOP-MISSMJIJ is not allowed to connect to this serv

根據上述操作後報錯

Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.


這是因爲連接的方式不對

String url = "jdbc:mysql://localhost:3306/db_cjky?useUnicode=true&characterEncoding=utf8";//改成這句,就可以了

改成上述就可以了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章