{"action":"opened","issue":{"url":"https://api.github.com/repos/sailorsenergy/windb2/issues/5","repository_url":"https://api.github.com/repos/sailorsenergy/windb2","labels_url":"https://api.github.com/repos/sailorsenergy/windb2/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/sailorsenergy/windb2/issues/5/comments","events_url":"https://api.github.com/repos/sailorsenergy/windb2/issues/5/events","html_url":"https://github.com/sailorsenergy/windb2/issues/5","id":160306465,"number":5,"title":"On fail to init of new WinDB2, print instructions","user":{"login":"sailorsenergy","id":7704035,"avatar_url":"https://avatars.githubusercontent.com/u/7704035?v=3","gravatar_id":"","url":"https://api.github.com/users/sailorsenergy","html_url":"https://github.com/sailorsenergy","followers_url":"https://api.github.com/users/sailorsenergy/followers","following_url":"https://api.github.com/users/sailorsenergy/following{/other_user}","gists_url":"https://api.github.com/users/sailorsenergy/gists{/gist_id}","starred_url":"https://api.github.com/users/sailorsenergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailorsenergy/subscriptions","organizations_url":"https://api.github.com/users/sailorsenergy/orgs","repos_url":"https://api.github.com/users/sailorsenergy/repos","events_url":"https://api.github.com/users/sailorsenergy/events{/privacy}","received_events_url":"https://api.github.com/users/sailorsenergy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sailorsenergy/windb2/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-14T23:20:27Z","updated_at":"2016-06-14T23:20:27Z","closed_at":null,"body":"It would be easiest if the WinDB2 user just provides an empty database to start with. If the DB doesn't already exist, the following instructions could be printed out:\r\n\r\n\r\n```shell\r\n# Create a new user, which will fail if the user already exists\r\ncreateuser -h $dbHost $dbUser\r\n\r\n# Create the database\r\ncreatedb -h $dbHost -U postgres --owner=$dbUser $dbName\r\n\r\n# Change the password for postgres user\r\npsql -h $dbHost -U postgres $dbName -c \"ALTER USER $dbUser WITH password '$password'\";\r\npsql -h $dbHost -U postgres $dbName -c \"GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO $dbUser\";\r\n```"}}
{"actor":{"display_login":"sailorsenergy"}}