我正在尝试连接到linux服务器上现有的mysql数据库和我的项目中的脚手架表格,并通过EFCore使用它们。
我使用下面的命令行搭建:
dotnet ef dbcontext scaffold "server={IP};port={PORT};userid={USER_ID};password={PASSWORD};database={DB_NAME};" Pomelo.EntityFrameworkCore.MySql -o Models -f
但它向我显示了这个错误:
Host '{MY_IP}' is not allowed to connect to
我想在我的.Net核心项目中使用实体框架核心来连接mysql。当我尝试搭建脚手架时,我得到了一个拒绝访问的错误。 Authentication to host 'MyHost.com' for user 'root' using method 'caching_sha2_password' failed with message: Access denied for user 'root'@'MYIP' (using password: YES) 我正在使用这个命令 Scaffold-DbContext "