{"id":21112212,"url":"https://github.com/icflorescu/openshift-cartridge-mysql","last_synced_at":"2025-07-22T03:03:59.398Z","repository":{"id":33493738,"uuid":"37139574","full_name":"icflorescu/openshift-cartridge-mysql","owner":"icflorescu","description":"Custom cartridge for OpenShift providing MySQL 5.7.17","archived":false,"fork":false,"pushed_at":"2017-03-31T15:31:05.000Z","size":36,"stargazers_count":13,"open_issues_count":3,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-08T17:45:05.539Z","etag":null,"topics":["cartridge","database","database-engine","mysql","mysql-openshift","openshift"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icflorescu.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}},"created_at":"2015-06-09T15:10:14.000Z","updated_at":"2022-12-26T06:28:17.000Z","dependencies_parsed_at":"2022-09-12T16:00:33.472Z","dependency_job_id":null,"html_url":"https://github.com/icflorescu/openshift-cartridge-mysql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/icflorescu/openshift-cartridge-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fopenshift-cartridge-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fopenshift-cartridge-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fopenshift-cartridge-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fopenshift-cartridge-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icflorescu","download_url":"https://codeload.github.com/icflorescu/openshift-cartridge-mysql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fopenshift-cartridge-mysql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266417029,"owners_count":23925300,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["cartridge","database","database-engine","mysql","mysql-openshift","openshift"],"created_at":"2024-11-20T01:27:21.025Z","updated_at":"2025-07-22T03:03:59.377Z","avatar_url":"https://github.com/icflorescu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom MySQL cartridge for OpenShift\n\n![mysql-openshift](https://cloud.githubusercontent.com/assets/581999/13375581/503e858e-ddac-11e5-96de-b4cd718e7cc3.png)\n\nThis is a custom OpenShift cartridge providing the latest MySQL version (5.7.17 as of March 29 2017).\n\n## Why\n\nBecause the standard OpenShift MySQL cartridge is stuck at 5.5 and some people are keen to use the latest MySQL server features (such as improved support for spatial data).\n\n## When to use\n\nWhen you need a quick and unsofisticated solution to run your application with the latest MySQL version.\n\n## Installing\n\nTo install this cartridge in your existing OpenShift application, go to **\"See the list of cartridges you can add\"**, paste the URL below in **\"Install your own cartridge\"** textbox at the bottom of the page and click \"Next\".\n\n    https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mysql/master/metadata/manifest.yml\n\n## Setting up\n\nOnce the cartridge is created and started, you can SSH into the database gear:\n\n    ssh gear-url\n\n...and connect to the server with `mysql` client like this:\n\n    ${OPENSHIFT_DATA_DIR}.mysql/bin/mysql --socket=${TMP}mysql.sock -u root\n\nIf you really need it, you can enable remote access for root like this (make sure to replace `secret` with a strong password):\n\n    ${OPENSHIFT_DATA_DIR}.mysql/bin/mysql --socket=${TMP}mysql.sock -u root -e \"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION; FLUSH PRIVILEGES;\"\n\nIf you're using multiple gears, here's how you can find the MySQL gear SSH url:\n\n    rhc app show application-name --gears\n\nOnce you've enabled remote access, you can use `rhc port-forward` and MySQL Workbench or your favorite client to connect from your development machine.\n\nUse `OPENSHIFT_MYSQL_DB_HOST` and `OPENSHIFT_MYSQL_DB_PORT` environment variables to connect from an application running in the main web cartridge. For instance, here's how you'd do it in a Node.js application using [Knex.js](http://knexjs.org/):\n\n    var knex = require('knex')({\n      client: 'mysql',\n      connection: {\n        host     : process.env.OPENSHIFT_MYSQL_DB_HOST,\n        port:    : process.env.OPENSHIFT_MYSQL_DB_PORT,\n        user     : 'your_database_user',\n        password : 'your_database_password',\n        database : 'myapp_test'\n      }\n    });\n\n## Notes\n\n- Can't guarantee this cartridge is production-ready. Some people use it though (on **their own responsibility**).\n- This is a **lean cartridge**. A standard MySQL installation takes a huge amount of space (over 1.5GB for MySQL 5.7.5). To save space, just the necessary MySQL binaries are installed.\n- In order to avoid an OpenShift configuration conflict, **the server instance is listening on 13306 instead of the standard MySQL port 3306**.\n- Don't hesitate to make a pull-request with an updated version in [this file](https://github.com/icflorescu/openshift-cartridge-mysql/blob/master/metadata/manifest.yml#L4) if you notice this cartridge version is behind the latest [MySQL release](http://dev.mysql.com/downloads/mysql).\n- **Don't open issues in this repository to ask questions about `rhc port-forward`**. Please refer to the [OpenShift documentation](https://developers.openshift.com/en/managing-port-forwarding.html) to learn about it. I am not an employee of RedHat / OpenShift, nor do I have any form of consultancy agreement with them and the fact that I open-sourced this cartridge doesn't mean I'm willing to offer free advice on the subject. Pull-requests and suggestions are always welcome, though.\n\n## Related\n\nSince you're here, chances are you might also be interested in this [custom Node.js cartridge](https://github.com/icflorescu/openshift-cartridge-nodejs) or this [custom MongoDB cartridge](https://github.com/icflorescu/openshift-cartridge-mongodb).\n\n## Credits and attributions\n\nThis cartridge was inspired by [Ted Wennmark](https://se.linkedin.com/in/tedwennmark)'s [blog post](http://mysql-nordic.blogspot.ro/2015/02/creating-minimal-mysql-installation-for.html) on how to create a minimal MySQL installation for an embedded system.\n\n## Credits\n\nSee contributors [here](https://github.com/icflorescu/openshift-cartridge-mysql/graphs/contributors).\n\nIf you find this repo useful, don't hesitate to give it a star and [spread the word](http://twitter.com/share?text=Checkout%20this%20custom%20MySQL%20cartridge%20for%20OpenShift!\u0026amp;url=http%3A%2F%2Fgithub.com/icflorescu/openshift-cartridge-mysql\u0026amp;hashtags=MySQL,database,OpenShift\u0026amp;via=icflorescu).\n\n## License\n\nThe [ISC License](http://github.com/icflorescu/openshift-cartridge-mysql/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficflorescu%2Fopenshift-cartridge-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficflorescu%2Fopenshift-cartridge-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficflorescu%2Fopenshift-cartridge-mysql/lists"}