-
Notifications
You must be signed in to change notification settings - Fork 1k
Let ProxySQL support Azure MySQL #2185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Automated message: PR pending admin approval for build testing |
include/MySQL_Thread.h
Outdated
@@ -335,6 +335,7 @@ class MySQL_Threads_Handler | |||
MySQL_Listeners_Manager *MLM; | |||
public: | |||
struct { | |||
bool azure_enabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check with Qianqian if the var "azure_enabled" follows the public name conversion as other open source tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The connection attribute field is defined by MySQL protocol, I think the MySQL drivers can set the key-value pairs for this field as long as it does not exceed the length limitation
ok to test |
@YYJiangLoveU : thank you for the pull request. |
@renecannao : here are some links: Create an Azure MySQL Database, Create Read Replicas in Azure MySQL and Azure Database for MySQL Documentation |
@YYJiangLoveU : thank you for the links! I reviewed the changes, it seems pretty straightforward. Although, can you please revert the changes to |
revert the changes
@renecannao : sorry for the late reply! |
Thank you @YYJiangLoveU ! |
@renecannao I installed proxysql_2.0.6-ubuntu18_amd64.deb v2.0.6 today and I can't find this option in global variables: (ProxySQL version 2.0.6-73-gc746bf7f, codename Truls)
@YYJiangLoveU can you also help how to enable it? thank you guys. :) |
hi @funkyfundev . |
@funkyfundev : the |
|
FYI to anyone that comes here: This doesn't work with Azure MySQL Single Server and won't work. Azure MySQL Flexible which doesn't use a gateway and thus doesn't need the Single server REQUIRES the Additionally, Azure has no interest in altering Single Server to make this work - it's already marked as obsolete and to be migrated away from ASAP. Confirmed the above information about Azure with Azure customer support and a technician that my support rep brought into a call with me. |
The username of the monitor account in ProxySQL can only be one name, so is the proxysql account username of a set of master-slave servers. However, when connecting to Azure MySQL database, it requires the user name in the format of 'user@server' or 'server%user' which causes the monitor/proxysql account to be logged into only one Azure MySQL server. Therefore ProxySQL cannot be used in the read-write split on Azure MySQL databases.
Now Azure MySQL R&Ds are doing the work of removing the ‘@' + 'server' in the username information, which will be online soon. However, a new connection attribute '_server_host' which contains the hostname information is added. This attribute has been already added in driver MariaDB Connector C and MariaDB Connector J (reference: MariaDB/mariadb-connector-j@de8883b).
So some code is added to make sure ProxySQL can be applied to the read-write split on Azure MySQL Servers in the future.