I’m trying to configure NServiceBus in a simple .netcore3.1 console application to use MySql.
I have the Persistence set to SqlPersistence with a SqlDialect.MySql.
I’m using a MySqlConnection with the connection string -
“Server=localhost;User=root;Database=database;Port=3306;Password=password;AllowUserVariables=True;AutoEnlist=false”
and SqlServerTransport.
When I run the application, I get the error :
“System.Exception: ‘Pre start-up check failed: Could not open connection to the SQL instance. Check the original error message for details. Original error message: Keyword not supported: ‘port’.’”
Does anyone have any ideas what it might be? Any help would be great!
FYI. I have efcore up and running using the MySql database.
I’m assuming you’re using the MySQL connectionstring for SQL Server as well.
As far as I know, Could not open connection to the SQL instance. is a SQL Server specific error messages. The fact that port is not supported as parameter supports that. In SQL Server you specify a port as follows: Server=myServerName,myPortNumber;, so server=(local)\sqlexpress,1337 for example.
Could you verify if you’re using the correct connectionstring for SQL Server and MySql?
I’m not using SQL Server. I want NServiceBus to connect to a MySql database and I’m using the connection string format provided in the example documentation mysql.
It seems as though NServiceBus still thinks it’s trying to connect to a SQL Server database, thus giving the “port not supported error”.