[英]Host — is not allowed to connect to this MySQL server .Net core
I face the problem when connecting my web application to localhost Mysql server.将我的 Web 应用程序连接到 localhost Mysql 服务器时,我遇到了这个问题。 This is the problem that I found:
这是我发现的问题:
Thank you.谢谢你。
Sometimes spacing and Order of parameters in connection string matters.有时,连接字符串中参数的间距和顺序很重要。
Remember documentation states "If you do not specify a server, localhost is assumed."请记住文档说明“如果您不指定服务器,则假定为 localhost。”
Server=myServerAddress; Port=1234; Database=myDataBase; Uid=myUsername; Pwd=myPassword;
Make sure your database server is running if its not running then its not able to make connection and bydefault mysql running on 3306 so don't need mention port if same in case of port number is different then we need to mention port确保您的数据库服务器正在运行,如果它没有运行,那么它无法建立连接,并且默认情况下 mysql 在 3306 上运行,因此如果端口号不同,则不需要提及端口,那么我们需要提及端口
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.