一、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