Open diepes opened 4 years ago
can you share your settings from json file?
https://vscode-sqltools.mteixeira.dev/driver/mssql#11-specific-options should help.
You probably need to add encrypt: true
to your options.
Still have problems?
I have the same problem.
With Azure MySQL and MariaDB databases, by default, it requires a certificate to connect. https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl
Is this something currently supported by this extension?
Edit:
I got it working from the docs.
Here is a connection profile that works with Azure databases:
{
"database": "foobar",
"dialect": "MySQL",
"name": "FooBar",
"password": "foobar123",
"port": 3306,
"server": "foobar-srv.mysql.database.azure.com",
"username": "user@foobar-srv",
"mysqlOptions": {
"ssl": true
}
}
We just have to add the ssl true part. Very simple, I thought I might have to point to the BaltimoreCyberTrustRoot certificat they refer to in the Azure docs.
Hi there @mtxr
i'm able to connect to the DB , but when run query got same error as show in the screenshot.
VS Code 1.55.2 Description: SQLTools MySQL/MariaDB Version: 0.2.0 Name: SQLTools Version: 0.23.0 OS : Windows 10 ver 20h2
{
"sqltools.connections": [
{
"mysqlOptions": {
"authProtocol": "default",
"ssl" : true,
"encrypt": true
},
"previewLimit": 50,
"server": "test-nonlive.mysql.database.azure.com",
"port": 3306,
"driver": "MySQL",
"name": "test-nonlive",
"database": "test_depo",
"username": "test_readuser",
"password": "test123123",
"connectionTimeout": 10000
}
]
}
Describe the bug A clear and concise description of what the bug is. Install SQLTools, enter azure details. Click TEST CONNECTION
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen. There to be a [ ] use ssl option
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.