.netcore 3.1 + MySql MariaDb


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 -

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?

Hi Dennis, Thanks for getting back to me.

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”.

Maybe I’m missing some extra configuration step?

Hi Mike,

I think I understand the problem. The SQL Persistence supports multiple database management systems.

However the SQL Server Transport unfortunately only supports SQL Server. Unfortunately you’ll have to select another technology to enable messaging.