{"id":20743868,"url":"https://github.com/reiniiriarios/run-queries","last_synced_at":"2026-04-13T13:01:14.404Z","repository":{"id":111408389,"uuid":"346904385","full_name":"reiniiriarios/run-queries","owner":"reiniiriarios","description":"Small bash script to run SQL queries on remote server and generate CSV files. Useful for commonly run queries that need to be handed off, such as for QA.","archived":false,"fork":false,"pushed_at":"2021-03-12T02:41:04.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T12:47:02.985Z","etag":null,"topics":["bash","bash-script","mariadb","mysql","ssh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reiniiriarios.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":"2021-03-12T02:09:18.000Z","updated_at":"2021-07-15T16:19:20.000Z","dependencies_parsed_at":"2023-04-29T14:50:46.346Z","dependency_job_id":null,"html_url":"https://github.com/reiniiriarios/run-queries","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reiniiriarios/run-queries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Frun-queries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Frun-queries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Frun-queries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Frun-queries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiniiriarios","download_url":"https://codeload.github.com/reiniiriarios/run-queries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Frun-queries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bash","bash-script","mariadb","mysql","ssh"],"created_at":"2024-11-17T07:13:20.939Z","updated_at":"2026-04-13T13:01:14.360Z","avatar_url":"https://github.com/reiniiriarios.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# run-queries\nSmall bash script to run MySQL queries on over SSH and generate CSV files. Useful for QA where queries need to be run repeatedly and CSV files handed off, to be imported elsewhere or easily opened in Excel or another spreadsheet application.\n\n## Configuration\n\n`mv config.example.sh config.sh` \n\nFill in all login information:\n\n* Path to SSH private key\n* SSH username\n* SSH host\n* MySQL/MariaDB username\n* MySQL/MariaDB password\n* MySQL/MariaDB host (usually 127.0.0.1 or localhost)\n* MySQL/MariaDB database name\n\n*This script only works with SSH private keys.*\n\n## Usage\n\nAdd `.sql` files to the `sql/` directory.\n\n`./run-query.sh`\n\nThe script will list all available queries. Enter which query to run by number. After running the query, a timestamped CSV will be in `csv/` and a corresponding TSV in `tsv/`.\n\n## Known Issues\n\n* This script will break if double quotes or backticks are used in `.sql` files.\n* Depending on data being fetched, the script may not generate a valid CSV. If so, try the TSV or adjust the query as needed.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Frun-queries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiniiriarios%2Frun-queries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Frun-queries/lists"}