im trying to connect to my xampp mysql server via c# webapi. Perhaps its something with my connection string, but i tried different variations of it(i used https://www.connectionstrings.com/mysql/). I checked my uid and pwd for sql using SELECT * FROM mysql.user, also database tennisapi exists in phpmyadmin.
string connStr = "datasource=localhost;port=3306;username=root;password=abcdef;database=tennisapi;";
MySqlConnection conn= new MySqlConnection(connStr);
{MySql.Data.MySqlClient.MySqlConnection}
CanRaiseEvents: true
ConnectionString: "server=127.0.0.1;port=3306;user id=root;password=abcdef;database=tennisapi"
ConnectionTimeout: 15
Container: null
DataSource: "127.0.0.1"
Database: "tennisapi"
DbProviderFactory: {MySql.Data.MySqlClient.MySqlClientFactory}
DesignMode: false
Events: {System.ComponentModel.EventHandlerList}
IsPasswordExpired: 'conn.IsPasswordExpired' threw an exception of type 'System.NullReferenceException'
ServerThread: 'conn.ServerThread' threw an exception of type 'System.NullReferenceException'
ServerVersion: 'conn.ServerVersion' threw an exception of type 'System.NullReferenceException'
Site: null
State: Closed
UseCompression: false