错误:
Assembly 'Assets/Dlls/MySql.Data.dll' will not be loaded due to errors:
Unable to resolve reference 'Google.Protobuf'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
原因:缺少dll文件
解决办法:在参考诸多文章之后的解决办法基本都是降低版本,我尝试在MySql.Data.dll文件的同级目录中找一个叫“Google.Protobuf.dll”的文件并放入Unity,成功解决
错误:Authentication method caching_sha2_password not supported by any of the available plugins.
原因:MySql8.0版本之后用的密码验证方式不同导致
解决方法:修改my.ini文件的默认验证方式及修改登录账号的验证方式然后重启mysql服务即可,但是我仍然验证失败,尝试很多次之后选择重启电脑(解决)
步骤:在MySQL Server安装目录中修改或者添加my.ini
[mysqld]
default_authentication_plugin=mysql_native_password
default-character-set=utf8 [client]
port=3306 default-character-set=utf8
重点是:
default_authentication_plugin=mysql_native_password
然后在控制台重启MySQL服务:
net stop 服务名
net start 服务名
我的服务名称为MySQL80:
至此完结