How to connect to mySql remotly

Vojta Simek 1 Reputation point
2022-01-07T11:02:44.287+00:00

I created an Azure Database for MySQL and I am trying to connect to the database with node js. But when I try to connect it shows me this error:
code: 'ER_SECURE_TRANSPORT_REQUIRED',
errno: 3159,
sqlMessage: 'Connections using insecure transport are prohibited while --require_secure_transport=ON.',
sqlState: 'HY000',
fatal: true

I wrote tracert to my azure database in powershell and it shows me this:
1 <1 ms <1 ms <1 ms internet.o2 [10.0.1.138]
2 5 ms 4 ms 4 ms 80.70.60.254
3 * * * Request timed out.
4 11 ms 10 ms 9 ms 126.197.broadband16.iol.cz [90.183.197.126]
5 10 ms 9 ms 9 ms 194.228.190.160
6 10 ms 9 ms 10 ms o2czech.prg01-96cbe-1b.ntwk.msn.net [104.44.198.111]
7 22 ms 16 ms 16 ms ae23-0.ear04.fra30.ntwk.msn.net [104.44.41.91]
8 23 ms 23 ms 23 ms be-25-0.ibr03.fra30.ntwk.msn.net [104.44.33.141]
9 23 ms * 128 ms be-4-0.ibr01.fra21.ntwk.msn.net [104.44.18.242]
10 * * 26 ms be-14-0.ibr01.ams30.ntwk.msn.net [104.44.28.103]
11 * 23 ms * be-1-0.ibr01.ams21.ntwk.msn.net [104.44.16.148]
12 31 ms 22 ms 22 ms ae106-0.icr04.ams21.ntwk.msn.net [104.44.23.245]
13 * * * Request timed out.
14 * * * Request timed out.
15 * * * Request timed out.
16 * * * Request timed out.
17 * * * Request timed out.
18 * * * Request timed out ......

Can you please help me to fix this problem?

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
714 questions
{count} votes