eclipse 连接mysql_eclipse连接MySQL
1.eclipse 連 mysql數據庫出現錯誤:nknown 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/jdbcStudy?useUnicode=true&characterEncoding=utf8";
2.訪問報錯com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
解決方法:
執行語句修改
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '66666';
Query OK, 0 rows affected (0.11 sec)mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
注意:root是用戶名,localhost是特指本機,mysql_native_password是舊的密碼驗證機制,66666是密碼
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的eclipse 连接mysql_eclipse连接MySQL的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql创建分区是否存在_mysql中
- 下一篇: centos6.4 安装 mysql_C