{"action":"closed","issue":{"url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1574","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1574/labels{/name}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1574/comments","events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1574/events","html_url":"https://github.com/project-hatohol/hatohol/issues/1574","id":108591946,"number":1574,"title":"DB serverが異なるマシンにある場合、hatohol-db-initorが正常に動作しない","user":{"login":"kz0817","id":2610513,"avatar_url":"https://avatars.githubusercontent.com/u/2610513?v=3","gravatar_id":"","url":"https://api.github.com/users/kz0817","html_url":"https://github.com/kz0817","followers_url":"https://api.github.com/users/kz0817/followers","following_url":"https://api.github.com/users/kz0817/following{/other_user}","gists_url":"https://api.github.com/users/kz0817/gists{/gist_id}","starred_url":"https://api.github.com/users/kz0817/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kz0817/subscriptions","organizations_url":"https://api.github.com/users/kz0817/orgs","repos_url":"https://api.github.com/users/kz0817/repos","events_url":"https://api.github.com/users/kz0817/events{/privacy}","received_events_url":"https://api.github.com/users/kz0817/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-28T05:33:35Z","updated_at":"2015-09-29T10:17:49Z","closed_at":"2015-09-29T10:17:49Z","body":"問題は、今、把握しているだけで２つある。\r\n1つ目は、DBを使った際のGRANTで、権限を与えられるユーザーのホストがlocalhostに限定されていること。\r\n<pre>\r\n        cursor.execute(\r\n            'GRANT ALL PRIVILEGES ON %s.* TO %s@localhost IDENTIFIED BY \\'%s\\''\r\n            % (args.db_name, args.hatohol_db_user, args.hatohol_db_password))\r\n</pre>\r\n\r\n2つ目は、テーブルを作るcreateDBHatohol関数にDB serverを指定することができない。つまり、localhostを想定している。\r\n<pre>\r\n    ret = hatohol.createDBHatohol(c_char_p(args.db_name),\r\n                                  c_char_p(args.db_user),\r\n                                  c_char_p(args.db_password))\r\n</pre>"}}