Skip to content
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

How To Create a Query Rule For a Particular Table of Multiple Databases #4766

Open
JabirBaig9395 opened this issue Nov 29, 2024 · 0 comments

Comments

@JabirBaig9395
Copy link

JabirBaig9395 commented Nov 29, 2024

Hi Team,
I am trying to create a query rule on one column of a table that is present in multiple MySQL databases. Can someone help me resolve this?
I have taken a look at the mysql_query_rules table in proxysql, I see the option of schema name (database name), but no option to create a rule on a particular table column which is present on multiple databases, please find my query rule below

INSERT INTO mysql_query_rules (rule_id, active, schemaname, match_pattern, replace_pattern) VALUES (1, 1, '*Membership*', '([^])rank([^])', '\1rank\2');

Membership is the table I have in multiple MySQL databases on a server; I am creating a rule to add backticks to column 'rank' by using proxysql for all sorts of queries going to database via proxysql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant