Hello Brown, Matt,
The issue you're encountering is because Encrypt and TrustServerCertificate are SQL Server connection string parameters, not MySQL ones. That's why you're getting the "option not supported" error.
For MySQL connections, you need to use the MySQL-specific SSL parameters instead. Try updating your connection string to:
<add key="app" value="server=server001;port=3306;database=db;uid=readonly;pwd=readonly;SslMode=Required;SslCa=path_to_ca_cert.pem" />
The key differences:
- Replace
Encrypt=yeswithSslMode=Required(orPreferredif you want to fall back to non-SSL) - Replace
TrustServerCertificate=yeswithSslCa=path_to_ca_cert.pemif you need to specify a CA certificate - If you don't have a specific CA cert, you can just use
SslMode=Requiredand it should work with the server's certificate
If you're using the MySQL Connector/NET, you might also see SslMode referred to as SSL Mode in some documentation.
The reason you're getting the "option not supported" error is because the MySQL provider doesn't recognize those SQL Server-specific parameters. Once you switch to the MySQL SSL parameters, your Fortify scan should pass and you should be able to retrieve data properly.
Hope this helps!