{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/mysql/pulls/comments/25074585","id":25074585,"diff_hunk":"@@ -0,0 +1,47 @@\n+#!/bin/bash\n+set -e\n+\n+# TODO: Only allow mysqld_safe?\n+if [ ! -d '/var/lib/mysql/mysql' -a \"${1%_safe}\" = 'mysqld' ]; then\n+\tif [ -z \"$MYSQL_ROOT_PASSWORD\" ]; then\n+\t\techo >&2 'error: database is uninitialized and MYSQL_ROOT_PASSWORD not set'\n+\t\techo >&2 '  Did you forget to add -e MYSQL_ROOT_PASSWORD=... ?'\n+\t\texit 1\n+\tfi\n+\t\n+\tscl enable mysql55 -- mysql_install_db --user=mysql --datadir=/var/lib/mysql\n+\t\n+\t# These statements _must_ be on individual lines, and _must_ end with\n+\t# semicolons (no line breaks or comments are permitted).\n+\t# TODO proper SQL escaping on ALL the things D:\n+\tTEMP_FILE='/tmp/mysql-first-time.sql'\n+\tcat > \"$TEMP_FILE\" <<-EOSQL\n+\t\tDELETE FROM mysql.user ;\n+\t\tCREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;\n+\t\tGRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;\n+\t\tDROP DATABASE IF EXISTS test ;\n+\tEOSQL\n+\t\n+\tif [ \"$MYSQL_DATABASE\" ]; then","path":"5.5/mysql/bin/docker-entrypoint.sh","position":25,"original_position":25,"commit_id":"efa3dfb08babb2a1b58d64d5824fcdf4e896731d","original_commit_id":"efa3dfb08babb2a1b58d64d5824fcdf4e896731d","user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"body":"agree on passwords, we should still default the others.\r\n","created_at":"2015-02-20T15:01:59Z","updated_at":"2015-02-20T15:01:59Z","html_url":"https://github.com/openshift/mysql/pull/1#discussion_r25074585","pull_request_url":"https://api.github.com/repos/openshift/mysql/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/openshift/mysql/pulls/comments/25074585"},"html":{"href":"https://github.com/openshift/mysql/pull/1#discussion_r25074585"},"pull_request":{"href":"https://api.github.com/repos/openshift/mysql/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/mysql/pulls/1","id":29624033,"html_url":"https://github.com/openshift/mysql/pull/1","diff_url":"https://github.com/openshift/mysql/pull/1.diff","patch_url":"https://github.com/openshift/mysql/pull/1.patch","issue_url":"https://api.github.com/repos/openshift/mysql/issues/1","number":1,"state":"open","locked":false,"title":"Initial MySQL repository","user":{"login":"mnagy","id":72469,"avatar_url":"https://avatars.githubusercontent.com/u/72469?v=3","gravatar_id":"","url":"https://api.github.com/users/mnagy","html_url":"https://github.com/mnagy","followers_url":"https://api.github.com/users/mnagy/followers","following_url":"https://api.github.com/users/mnagy/following{/other_user}","gists_url":"https://api.github.com/users/mnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/mnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnagy/subscriptions","organizations_url":"https://api.github.com/users/mnagy/orgs","repos_url":"https://api.github.com/users/mnagy/repos","events_url":"https://api.github.com/users/mnagy/events{/privacy}","received_events_url":"https://api.github.com/users/mnagy/received_events","type":"User","site_admin":false},"body":"My first take on OpenShift MySQL image.","created_at":"2015-02-19T16:10:56Z","updated_at":"2015-02-20T15:01:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76ef740cd559e34bfcc5cc0deb29f0d3ae550e40","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/mysql/pulls/1/commits","review_comments_url":"https://api.github.com/repos/openshift/mysql/pulls/1/comments","review_comment_url":"https://api.github.com/repos/openshift/mysql/pulls/comments/{number}","comments_url":"https://api.github.com/repos/openshift/mysql/issues/1/comments","statuses_url":"https://api.github.com/repos/openshift/mysql/statuses/efa3dfb08babb2a1b58d64d5824fcdf4e896731d","head":{"label":"mnagy:initial","ref":"initial","sha":"efa3dfb08babb2a1b58d64d5824fcdf4e896731d","user":{"login":"mnagy","id":72469,"avatar_url":"https://avatars.githubusercontent.com/u/72469?v=3","gravatar_id":"","url":"https://api.github.com/users/mnagy","html_url":"https://github.com/mnagy","followers_url":"https://api.github.com/users/mnagy/followers","following_url":"https://api.github.com/users/mnagy/following{/other_user}","gists_url":"https://api.github.com/users/mnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/mnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnagy/subscriptions","organizations_url":"https://api.github.com/users/mnagy/orgs","repos_url":"https://api.github.com/users/mnagy/repos","events_url":"https://api.github.com/users/mnagy/events{/privacy}","received_events_url":"https://api.github.com/users/mnagy/received_events","type":"User","site_admin":false},"repo":{"id":31023512,"name":"mysql","full_name":"mnagy/mysql","owner":{"login":"mnagy","id":72469,"avatar_url":"https://avatars.githubusercontent.com/u/72469?v=3","gravatar_id":"","url":"https://api.github.com/users/mnagy","html_url":"https://github.com/mnagy","followers_url":"https://api.github.com/users/mnagy/followers","following_url":"https://api.github.com/users/mnagy/following{/other_user}","gists_url":"https://api.github.com/users/mnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/mnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnagy/subscriptions","organizations_url":"https://api.github.com/users/mnagy/orgs","repos_url":"https://api.github.com/users/mnagy/repos","events_url":"https://api.github.com/users/mnagy/events{/privacy}","received_events_url":"https://api.github.com/users/mnagy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnagy/mysql","description":"","fork":true,"url":"https://api.github.com/repos/mnagy/mysql","forks_url":"https://api.github.com/repos/mnagy/mysql/forks","keys_url":"https://api.github.com/repos/mnagy/mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnagy/mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnagy/mysql/teams","hooks_url":"https://api.github.com/repos/mnagy/mysql/hooks","issue_events_url":"https://api.github.com/repos/mnagy/mysql/issues/events{/number}","events_url":"https://api.github.com/repos/mnagy/mysql/events","assignees_url":"https://api.github.com/repos/mnagy/mysql/assignees{/user}","branches_url":"https://api.github.com/repos/mnagy/mysql/branches{/branch}","tags_url":"https://api.github.com/repos/mnagy/mysql/tags","blobs_url":"https://api.github.com/repos/mnagy/mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnagy/mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnagy/mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnagy/mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnagy/mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/mnagy/mysql/languages","stargazers_url":"https://api.github.com/repos/mnagy/mysql/stargazers","contributors_url":"https://api.github.com/repos/mnagy/mysql/contributors","subscribers_url":"https://api.github.com/repos/mnagy/mysql/subscribers","subscription_url":"https://api.github.com/repos/mnagy/mysql/subscription","commits_url":"https://api.github.com/repos/mnagy/mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnagy/mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnagy/mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnagy/mysql/issues/comments/{number}","contents_url":"https://api.github.com/repos/mnagy/mysql/contents/{+path}","compare_url":"https://api.github.com/repos/mnagy/mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnagy/mysql/merges","archive_url":"https://api.github.com/repos/mnagy/mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnagy/mysql/downloads","issues_url":"https://api.github.com/repos/mnagy/mysql/issues{/number}","pulls_url":"https://api.github.com/repos/mnagy/mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/mnagy/mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/mnagy/mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnagy/mysql/labels{/name}","releases_url":"https://api.github.com/repos/mnagy/mysql/releases{/id}","created_at":"2015-02-19T16:07:22Z","updated_at":"2015-02-19T15:03:58Z","pushed_at":"2015-02-19T16:09:52Z","git_url":"git://github.com/mnagy/mysql.git","ssh_url":"git@github.com:mnagy/mysql.git","clone_url":"https://github.com/mnagy/mysql.git","svn_url":"https://github.com/mnagy/mysql","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"42e02a73e5c16e03bf0f5a03aa5d7e96df6d3ade","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":31020442,"name":"mysql","full_name":"openshift/mysql","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/mysql","description":"","fork":false,"url":"https://api.github.com/repos/openshift/mysql","forks_url":"https://api.github.com/repos/openshift/mysql/forks","keys_url":"https://api.github.com/repos/openshift/mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/mysql/teams","hooks_url":"https://api.github.com/repos/openshift/mysql/hooks","issue_events_url":"https://api.github.com/repos/openshift/mysql/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/mysql/events","assignees_url":"https://api.github.com/repos/openshift/mysql/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/mysql/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/mysql/tags","blobs_url":"https://api.github.com/repos/openshift/mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/mysql/languages","stargazers_url":"https://api.github.com/repos/openshift/mysql/stargazers","contributors_url":"https://api.github.com/repos/openshift/mysql/contributors","subscribers_url":"https://api.github.com/repos/openshift/mysql/subscribers","subscription_url":"https://api.github.com/repos/openshift/mysql/subscription","commits_url":"https://api.github.com/repos/openshift/mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/mysql/issues/comments/{number}","contents_url":"https://api.github.com/repos/openshift/mysql/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/mysql/merges","archive_url":"https://api.github.com/repos/openshift/mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/mysql/downloads","issues_url":"https://api.github.com/repos/openshift/mysql/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/mysql/labels{/name}","releases_url":"https://api.github.com/repos/openshift/mysql/releases{/id}","created_at":"2015-02-19T15:03:58Z","updated_at":"2015-02-19T15:03:58Z","pushed_at":"2015-02-19T16:05:22Z","git_url":"git://github.com/openshift/mysql.git","ssh_url":"git@github.com:openshift/mysql.git","clone_url":"https://github.com/openshift/mysql.git","svn_url":"https://github.com/openshift/mysql","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/mysql/pulls/1"},"html":{"href":"https://github.com/openshift/mysql/pull/1"},"issue":{"href":"https://api.github.com/repos/openshift/mysql/issues/1"},"comments":{"href":"https://api.github.com/repos/openshift/mysql/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/mysql/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/mysql/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/openshift/mysql/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/mysql/statuses/efa3dfb08babb2a1b58d64d5824fcdf4e896731d"}}}}