{"id":18663124,"url":"https://github.com/asapdotid/docker-mysql","last_synced_at":"2026-04-11T14:34:24.504Z","repository":{"id":113710977,"uuid":"167309112","full_name":"asapdotid/docker-mysql","owner":"asapdotid","description":"Custome from Bitnami project MySQL Server Community 5.7 \u0026 8.0","archived":false,"fork":false,"pushed_at":"2019-01-24T05:36:00.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-18T04:36:14.536Z","etag":null,"topics":["database","docker","docker-compose","mysql","mysql-database","website"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asapdotid.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":"2019-01-24T05:31:49.000Z","updated_at":"2019-07-18T03:17:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"8af69ab8-4bfc-461e-80ae-d90b890d6e19","html_url":"https://github.com/asapdotid/docker-mysql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asapdotid/docker-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdocker-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdocker-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdocker-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdocker-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asapdotid","download_url":"https://codeload.github.com/asapdotid/docker-mysql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdocker-mysql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31684525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["database","docker","docker-compose","mysql","mysql-database","website"],"created_at":"2024-11-07T08:15:11.209Z","updated_at":"2026-04-11T14:34:24.496Z","avatar_url":"https://github.com/asapdotid.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is MySQL?\n\n\u003e MySQL is a fast, reliable, scalable, and easy to use open-source relational database system. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.\n\n[https://mysql.com/](https://mysql.com/)\n\n# TL;DR;\n\n# Custom Information\n\n\u003e Setting Timezone server every docker image os debian and orcle linux container to Asia/Jakarta\n\n# Persisting your database\n\nIf you remove the container all your data will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.\n\nFor persistence you should mount a directory at the `/bitnami/mysql/data` path. If the mounted directory is empty, it will be initialized on the first run.\n\n\n## Using Docker Compose\n\nWhen not specified, Docker Compose automatically sets up a new network and attaches all deployed services to that network. However, we will explicitly define a new `bridge` network named `app-tier`. In this example we assume that you want to connect to the MySQL server from your own custom application image which is identified in the following snippet by the service name `myapp`.\n\n```yaml\nversion: '2'\n\nnetworks:\n  app-tier:\n    driver: bridge\n\nservices:\n  mysql:\n    image: 'bitnami/mysql:latest'\n    environment:\n      - ALLOW_EMPTY_PASSWORD=yes\n    networks:\n      - app-tier\n  myapp:\n    image: 'YOUR_APPLICATION_IMAGE'\n    networks:\n      - app-tier\n```\n\n\u003e **IMPORTANT**:\n\u003e\n\u003e 1. Please update the `YOUR_APPLICATION_IMAGE` placeholder in the above snippet with your application image\n\u003e 2. In your application container, use the hostname `mysql` to connect to the MySQL server\n\nLaunch the containers using:\n\n```bash\n$ docker-compose up -d\n```\n\n# Configuration\n\n## Initializing a new instance\n\nWhen the container is executed for the first time, it will execute the files with extensions `.sh`, `.sql` and `.sql.gz` located at `/docker-entrypoint-initdb.d`.\n\nIn order to have your custom files inside the docker image you can mount them as a volume.\n\n## Setting the root password on first run\n\nThe root user and password can easily be setup with the Bitnami MySQL Docker image using the following environment variables:\n\n - `MYSQL_ROOT_USER`: The database admin user. Defaults to `root`.\n - `MYSQL_ROOT_PASSWORD`: The database admin user password. No defaults.\n\nPassing the `MYSQL_ROOT_PASSWORD` environment variable when running the image for the first time will set the password of the `MYSQL_ROOT_USER` user to the value of `MYSQL_ROOT_PASSWORD`.\n\n```yaml\nversion: '2'\n\nservices:\n  mysql:\n    image: 'bitnami/mysql:latest'\n    ports:\n      - '3306:3306'\n    environment:\n      - MYSQL_ROOT_PASSWORD=password123\n```\n\n**Warning** The `MYSQL_ROOT_USER` user is always created with remote access. It's suggested that the `MYSQL_ROOT_PASSWORD` env variable is always specified to set a password for the `MYSQL_ROOT_USER` user. In case you want to allow the `MYSQL_ROOT_USER` user to access the database without a password set the environment variable `ALLOW_EMPTY_PASSWORD=yes`. **This is recommended only for development**.\n\n## Allowing empty passwords\n\nBy default the MySQL image expects all the available passwords to be set. In order to allow empty passwords, it is necessary to set the `ALLOW_EMPTY_PASSWORD=yes` env variable. This env variable is only recommended for testing or development purposes. We strongly recommend specifying the `MYSQL_ROOT_PASSWORD` for any other scenario.\n\n```yaml\nversion: '2'\n\nservices:\n  mysql:\n    image: 'bitnami/mysql:latest'\n    ports:\n      - '3306:3306'\n    environment:\n      - ALLOW_EMPTY_PASSWORD=yes\n```\n\n## Creating a database on first run\n\nBy passing the `MYSQL_DATABASE` environment variable when running the image for the first time, a database will be created. This is useful if your application requires that a database already exists, saving you from having to manually create the database using the MySQL client.\n\n```yaml\nversion: '2'\n\nservices:\n  mysql:\n    image: 'bitnami/mysql:latest'\n    ports:\n      - '3306:3306'\n    environment:\n      - ALLOW_EMPTY_PASSWORD=yes\n      - MYSQL_DATABASE=my_database\n```\n\n## Creating a database user on first run\n\nYou can create a restricted database user that only has permissions for the database created with the [`MYSQL_DATABASE`](#creating-a-database-on-first-run) environment variable. To do this, provide the `MYSQL_USER` environment variable and to set a password for the database user provide the `MYSQL_PASSWORD` variable.\n\n```yaml\nversion: '2'\n\nservices:\n  mysql:\n    image: 'bitnami/mysql:latest'\n    ports:\n      - '3306:3306'\n    environment:\n      - ALLOW_EMPTY_PASSWORD=yes\n      - MYSQL_USER=my_user\n      - MYSQL_PASSWORD=my_password\n      - MYSQL_DATABASE=my_database\n```\n\n**Note!** The `root` user will be created with remote access and without a password if `ALLOW_EMPTY_PASSWORD` is enabled. Please provide the `MYSQL_ROOT_PASSWORD` env variable instead if you want to set a password for the `root` user.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasapdotid%2Fdocker-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasapdotid%2Fdocker-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasapdotid%2Fdocker-mysql/lists"}