{"id":24815473,"url":"https://github.com/haydenjames/mysqlmonitor-script","last_synced_at":"2025-10-13T17:31:44.426Z","repository":{"id":273581694,"uuid":"920192610","full_name":"haydenjames/mysqlmonitor-script","owner":"haydenjames","description":"MySQL Monitor for the Terminal: A quick tool to view MySQL runtime and performance metrics.","archived":false,"fork":false,"pushed_at":"2025-07-29T14:22:37.000Z","size":260,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-10T02:42:40.363Z","etag":null,"topics":["linux","mariadb","mysql","percona"],"latest_commit_sha":null,"homepage":"https://linuxblog.io/mysql-monitor-script/","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/haydenjames.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-21T18:12:23.000Z","updated_at":"2025-09-03T16:50:02.000Z","dependencies_parsed_at":"2025-01-28T21:27:23.299Z","dependency_job_id":null,"html_url":"https://github.com/haydenjames/mysqlmonitor-script","commit_stats":null,"previous_names":["haydenjames/mysql-monitor-script"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/haydenjames/mysqlmonitor-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2Fmysqlmonitor-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2Fmysqlmonitor-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2Fmysqlmonitor-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2Fmysqlmonitor-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haydenjames","download_url":"https://codeload.github.com/haydenjames/mysqlmonitor-script/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2Fmysqlmonitor-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016290,"owners_count":26085828,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["linux","mariadb","mysql","percona"],"created_at":"2025-01-30T16:29:18.302Z","updated_at":"2025-10-13T17:31:44.420Z","avatar_url":"https://github.com/haydenjames.png","language":"Shell","readme":"## MySQL Monitor Script\n![MySQL Monitor Script Output](https://static.linuxblog.io/wp-content/uploads/2025/01/mysqlmonitor-script-3.png)\n\nThis is a lightweight bash script designed to provide sysadmins and DBAs with a quick overview of MySQL metrics. It displays critical metrics like InnoDB buffer usage, query performance, and system memory, along with brief explanations of each variable.\n\n## How to Install and Use\nCut and paste each step.\n\n### Step 1: Download the script\n```bash\ncurl -O https://raw.githubusercontent.com/haydenjames/mysqlmonitor-script/main/mysqlmonitor.sh\n```\n\n### Step 2: Make the script executable\n```bash\nchmod +x mysqlmonitor.sh\n```\n\n### Step 3: Run the script\n```bash\n./mysqlmonitor.sh\n```\n\nDone! \n\n---------------------------------------------------\n\nor...\n### Single command install and run\nSimply cut and paste. This command will download and run mysqlmonitor.sh immediately.  \n```bash\ncurl -O https://raw.githubusercontent.com/haydenjames/mysqlmonitor-script/main/mysqlmonitor.sh \u0026\u0026 \\\nchmod +x mysqlmonitor.sh \u0026\u0026 \\\n./mysqlmonitor.sh\n```\n\n## Complementary Guide \nLinuxblog.io: [MySQL Monitor: A Simple MySQL Monitoring Script](https://linuxblog.io/mysql-monitor-script/) - This blog post provides detailed guidance on the variables used in the script, along with links to common MySQL tuning pitfalls and tips to help you optimize your database performance.\n\n## Known bugs\n\n### Fix output when screensize is too small. \nWhen the terminal window's height is smaller than the number of lines the script attempts to display, the terminal starts scrolling. This results in repetitive or overlapping content, making the output unreadable. \nIn the meantime, I've added a check for minimum terminal size. The minimum is 50×45.\n\n## TO DO\n\n### Add a Help screen\nAdd a --help flag for users who want to see usage information.\n\n## Common Troubleshooting\nHere are some common issues and how to resolve them:\n\n### 1. Missing MySQL Credentials\nIf the script fails to connect to your MySQL server due to missing credentials, you may need to create a `~/.my.cnf` file for automatic authentication.\n\n#### Steps to Create `.my.cnf`:\n1. Create the file:\n    ```bash\n    nano ~/.my.cnf\n    ```\n\n2. Add the following structure to the file:\n    ```makefile\n    [client]\n    user=your_mysql_username\n    password=your_mysql_password\n    ```\n\n3. Secure the file permissions:\n    ```bash\n    chmod 600 ~/.my.cnf\n    ```\n\n4. Rerun the script.\n\n---\n\n### 2. Running the Script with `sudo`\nIf you encounter permission issues as a non-root user, try running the script with `sudo`:\n```bash\nsudo ./mysqlmonitor.sh\n```\n\n---\n\n### 3. Verifying MySQL Status\nIf the script fails to connect even with credentials:\n- Ensure the MySQL server is running:\n    ```bash\n    sudo systemctl status mysql\n    ```\n    or\n    ```bash\n    sudo systemctl status mariadb\n    ```\n- Verify that the credentials in `~/.my.cnf` are correct.\n\n---------------------------------------------------\nThank you for using MySQL Monitor, we hope it helps simplify your database monitoring and tuning tasks!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenjames%2Fmysqlmonitor-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaydenjames%2Fmysqlmonitor-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenjames%2Fmysqlmonitor-script/lists"}