{"action":"opened","issue":{"url":"https://api.github.com/repos/google/grr/issues/237","labels_url":"https://api.github.com/repos/google/grr/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/google/grr/issues/237/comments","events_url":"https://api.github.com/repos/google/grr/issues/237/events","html_url":"https://github.com/google/grr/issues/237","id":99017130,"number":237,"title":"Initialize dies if you choose MySQL \"No Storage System MySQLAdvancedDataStore\"","user":{"login":"destijl","id":1291767,"avatar_url":"https://avatars.githubusercontent.com/u/1291767?v=3","gravatar_id":"","url":"https://api.github.com/users/destijl","html_url":"https://github.com/destijl","followers_url":"https://api.github.com/users/destijl/followers","following_url":"https://api.github.com/users/destijl/following{/other_user}","gists_url":"https://api.github.com/users/destijl/gists{/gist_id}","starred_url":"https://api.github.com/users/destijl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/destijl/subscriptions","organizations_url":"https://api.github.com/users/destijl/orgs","repos_url":"https://api.github.com/users/destijl/repos","events_url":"https://api.github.com/users/destijl/events{/privacy}","received_events_url":"https://api.github.com/users/destijl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-04T17:19:13Z","updated_at":"2015-08-04T17:19:13Z","closed_at":null,"body":"Via brian...\r\n\r\n```\r\nI built a vanilla Ubuntu 14.04 system today for some testing and found that grr_config_updater initialize will fail if you select MySQL as the datastore. Manually installing \"mysql-server\" and \"python-mysqldb\" resolves the issue so the initialize command will succeed. Should these packages be added to the installation script when the MySQL datastore is selected?\r\n\r\nError included below for searchability :)\r\n\r\nConfiguration parameters set. You can edit these in /etc/grr/server.local.yaml\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/grr_config_updater\", line 9, in <module>\r\n    load_entry_point('grr==0.3.0-7', 'console_scripts', 'grr_config_updater')()\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/distro_entry.py\", line 53, in ConfigUpdater\r\n    flags.StartMain(config_updater.main)\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/flags.py\", line 107, in StartMain\r\n    main([sys.argv[0]])\r\n  File \"/usr/lib/python2.7/dist-packages/grr/tools/config_updater.py\", line 785, in main\r\n    Initialize(config_lib.CONFIG, token=token)\r\n  File \"/usr/lib/python2.7/dist-packages/grr/tools/config_updater.py\", line 707, in Initialize\r\n    AddUsers(token=token)\r\n  File \"/usr/lib/python2.7/dist-packages/grr/tools/config_updater.py\", line 638, in AddUsers\r\n    startup.Init()\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/startup.py\", line 107, in Init\r\n    registry.Init()\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/registry.py\", line 220, in Init\r\n    InitHook().Init(skip_set)\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/registry.py\", line 185, in Init\r\n    self._RunAllHooks(executed_hooks, skip_set)\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/registry.py\", line 175, in _RunAllHooks\r\n    self._RunSingleHook(hook_cls, executed_hooks)\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/registry.py\", line 163, in _RunSingleHook\r\n    cls_instance.Run()\r\n  File \"/usr/lib/python2.7/dist-packages/grr/lib/data_store.py\", line 686, in Run\r\n    config_lib.CONFIG[\"Datastore.implementation\"])\r\nRuntimeError: No Storage System MySQLAdvancedDataStore found.\r\n```\r\n@pidydx intended the script to wait until the DB is available rather than die. And at the point it prompts you for the DB it should make it clear that it needs the DB to proceed and give you the apt-get command to run to install mysql and python libraries. In fact it should probably link to a short doc about setting up the MySQL DB because you'll need a user with the right permissions.\r\n"}}