一、host '' is not allowed to connect to this Mysql server
原因:沒有打開遠程訪問
1、遠程鏈接服務器,在服務器內mysql系統目錄下的/bin文件下執行./mysql -u root -p;輸入密碼登入mysql;
2、在mysql中執行use mysql命令,進入系統數據庫
3、在mysql數據庫中執行 update user set host = '%' where user = 'root';;如果返回結果如下圖:
該結果表示是由於當前的root用戶限制在當前的內網ip內訪問的,需要修改他的訪問域。
4、在mysql數據庫中執行 update user set host = ‘%’ where user = ‘root’;
5、FLUSH PRIVILEGES; 這個命令是刷新MySQL的權限相關表
二、調用 SSPI 失敗,請參見內部異常。
原因分析:
據查此問題因mysql數據庫沒有安裝ssl證書導致。
解決分析:
連接字符串中加上“SslMode=none”;。
string connectStr = "server=127.0.0.1; User Id=root; password=123456; Database=studentdb;SslMode=none;Charset=utf8";
三、調用 SSPI 失敗,請參見內部異常。
字符集問題處理:
https://blog.csdn.net/YSTWD_WY/article/details/124193675
四、給定關鍵字不在字典中 The given key was not present in the dictionary.
解決方法:
https://www.cnblogs.com/xbding/p/12680490.html