here's my connection string
"Server=xxx.xxx.xxx.x;Database=database;Uid='root';Pwd='';"
the ip on the server is the ip of the other computer(have xampp) that I want to access.
this is the Exception I receive.
MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts. at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open()
I think your connection string is wrong
I should be In
<appSettings>
inor
in
<connectionStrings>
As well as Refer this Link to Enable Remote Access for Mysql
With mysql on C# you don't need single quote in the connexion string
Ex :
You can also verify that you can ping the other computer :