Mymysql connection string for Mysql hosted on Azure #1077

Closed
opened 2018-08-20 12:34:08 +00:00 by Ilanak · 3 comments
Ilanak commented 2018-08-20 12:34:08 +00:00 (Migrated from github.com)

I'm trying to connect to MySql DB hosted on Azure using mymysql driver.

I tried connecting using this connection string:
tcp:servername.mysql.database.azure.com:3306*dbname/username@servername/password

but i'm getting an error:
Received #9002 error from MySQL server: "SSL connection is required. Please specify SSL options and retry."

I tried adding ssl options, but I see that the only supported options are "ladder" and "timeout".

previously I used mysql driver with the following connection string and it worked:
username@servername:password@tcp(servername.mysql.database.azure.com:3306)/dbname?allowNativePasswords=true&tls=true

How can I enable the ssl option using mymysql?

I'm trying to connect to MySql DB hosted on Azure using mymysql driver. I tried connecting using this connection string: tcp:servername.mysql.database.azure.com:3306*dbname/username@servername/password but i'm getting an error: Received #9002 error from MySQL server: "SSL connection is required. Please specify SSL options and retry." I tried adding ssl options, but I see that the [only supported options](https://github.com/go-xorm/xorm/blob/11743c1a80897b0fdbf79d88ebcaa7dd5f9d3cf3/dialect_mysql.go#L592) are "ladder" and "timeout". previously I used mysql driver with the following connection string and it worked: username@servername:password@tcp(servername.mysql.database.azure.com:3306)/dbname?allowNativePasswords=true&tls=true How can I enable the ssl option using mymysql?

I'm not very familiar with this driver. You can go to https://github.com/ziutek/mymysql to find the options.

I'm not very familiar with this driver. You can go to https://github.com/ziutek/mymysql to find the options.
Ilanak commented 2018-08-20 14:17:10 +00:00 (Migrated from github.com)

I just noticed that they have an open issue on this https://github.com/ziutek/mymysql/issues/121

I just noticed that they have an open issue on this https://github.com/ziutek/mymysql/issues/121

Yes. Maybe you could try github.com/go-sql-driver/mysql

Yes. Maybe you could try github.com/go-sql-driver/mysql
lunny closed this issue 2021-09-17 08:34:54 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1077
No description provided.