eclipse 连接mysql_eclipse连接MySQL
1.eclipse 連 mysql數(shù)據(jù)庫(kù)出現(xiàn)錯(cuò)誤: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.訪問報(bào)錯(cuò)com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
解決方法:
執(zhí)行語(yǔ)句修改
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是特指本機(jī),mysql_native_password是舊的密碼驗(yàn)證機(jī)制,66666是密碼
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的eclipse 连接mysql_eclipse连接MySQL的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: mysql创建分区是否存在_mysql中
- 下一篇: centos6.4 安装 mysql_C
