{"id":14971480,"url":"https://github.com/uberswe/multiquery","last_synced_at":"2025-06-20T21:34:50.702Z","repository":{"id":149465859,"uuid":"259132709","full_name":"uberswe/multiquery","owner":"uberswe","description":"A simple tool to run MySQL queries on multiple databases and return the results.","archived":false,"fork":false,"pushed_at":"2020-09-08T16:33:59.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T05:26:06.442Z","etag":null,"topics":["mariadb","mysql","query","ssh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uberswe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-26T21:03:25.000Z","updated_at":"2021-08-10T09:50:33.000Z","dependencies_parsed_at":"2024-06-19T09:05:01.132Z","dependency_job_id":null,"html_url":"https://github.com/uberswe/multiquery","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/uberswe/multiquery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmultiquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmultiquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmultiquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmultiquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uberswe","download_url":"https://codeload.github.com/uberswe/multiquery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmultiquery/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261020618,"owners_count":23098192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mariadb","mysql","query","ssh"],"created_at":"2024-09-24T13:45:15.963Z","updated_at":"2025-06-20T21:34:45.682Z","avatar_url":"https://github.com/uberswe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultiQuery (mq)\n\nA simple cli tool written in Go to query multiple MySQL databases.\n\nSometimes I have the need to query multiple MySQL databases with the same structure. So I built this simple tool to allow me to do just that. You can connect to a mysql host directly or via an SSH tunnel.\n\nThe following query will find all the databases with the prefix `wp_` and run a select query on each database and aggregate the results.\n```bash\nmq --host=localhost --dbprefix=wp_ --query=\"SELECT * FROM wp_users\"\n```\n\nThis query will ssh to another host and then connect via mysql and run the queries on individual threads\n\n```bash\nmq --host=10.10.10.100 --query=\"SELECT * FROM wp_users\" --sshhost=wpserver --user=wp --password=[omitted] --threaded --dbprefix=wp_\n```\n\nUse the help command to read about the other parameters that are supported\n\n```bash\nmq --help\n```\n\nThis tool should have no bugs but use it at your own risk. If you are concerned please review my code and feel free to fork the repository to make your own changes. Feel free to open a pull request if you would like to contribute improvements to the code.\n\nYou can also use the `--threaded` option to run concurrent queries.\n\nSSH tunneling is supported if you specify an SSH host.\n\nThis tool tries to read ssh config files and my.cnf files when possible.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberswe%2Fmultiquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuberswe%2Fmultiquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberswe%2Fmultiquery/lists"}