我在另一台计算机上有一个网络服务器,该服务器使用 xampp 运行 MySql 。我可以使用浏览器登录到 ip / phpMyAdmin / ,并带有基数 root 和 password 。但是我无法使用 MySql.Data 库通过C#登录。
代码:
div
在Internet.signIn(with: code) { (error) in
// This line aka the closure is never executed
if error != nil{
alert("Something went wrong", "Try resending the SMS")
return
}
alert("Verified", "Let's continue with entering further user information now") {
self.performSegue(withIdentifier: "userWasVerifiedSegue", sender: self)
}
}
,我得到一个例外:
var connectionData = new MySqlConnectionStringBuilder();
connectionData.Server = "ip";
connectionData.Database = "db-name";
connectionData.UserID = "root";
connectionData.Password = "password";
connectionData.Port = 3306;
connectionData.SslMode = MySqlSslMode.None;
var connection = new MySqlConnection(connectionData.ToString());
connection.Open();
我在这里做错了什么?底线相同,所以应该起作用。