{"action":"created","issue":{"url":"https://api.github.com/repos/kalabox/kalabox-app-pantheon/issues/85","labels_url":"https://api.github.com/repos/kalabox/kalabox-app-pantheon/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/kalabox/kalabox-app-pantheon/issues/85/comments","events_url":"https://api.github.com/repos/kalabox/kalabox-app-pantheon/issues/85/events","html_url":"https://github.com/kalabox/kalabox-app-pantheon/issues/85","id":129561063,"number":85,"title":"Accessing DB externally?","user":{"login":"WidgetsBurritos","id":5263371,"avatar_url":"https://avatars.githubusercontent.com/u/5263371?v=3","gravatar_id":"","url":"https://api.github.com/users/WidgetsBurritos","html_url":"https://github.com/WidgetsBurritos","followers_url":"https://api.github.com/users/WidgetsBurritos/followers","following_url":"https://api.github.com/users/WidgetsBurritos/following{/other_user}","gists_url":"https://api.github.com/users/WidgetsBurritos/gists{/gist_id}","starred_url":"https://api.github.com/users/WidgetsBurritos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WidgetsBurritos/subscriptions","organizations_url":"https://api.github.com/users/WidgetsBurritos/orgs","repos_url":"https://api.github.com/users/WidgetsBurritos/repos","events_url":"https://api.github.com/users/WidgetsBurritos/events{/privacy}","received_events_url":"https://api.github.com/users/WidgetsBurritos/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-28T19:53:22Z","updated_at":"2016-01-29T19:17:42Z","closed_at":"2016-01-28T19:57:02Z","body":"So I saw for a standard Drupal install you can access the DB externally:\r\nhttps://github.com/kalabox/kalabox-app-drupal#getting-to-your-database\r\nBut after that didn't work in my case, and after reading kalabox/kalabox-app-pantheon#46 and seeing that Pantheon is based on PressFlow, it seems there isn't a direct port into the database.\r\n\r\nI've been a little bit stumped on how I might access that database from outside of my VM. \r\n\r\nI did a print_r() on the $pressflow_settings inside includes/bootstrap.inc and got the following information: \r\n```\r\nArray\r\n(\r\n    [databases] => Array\r\n        (\r\n            [default] => Array\r\n                (\r\n                    [default] => Array\r\n                        (\r\n                            [driver] => mysql\r\n                            [prefix] => \r\n                            [database] => pantheon\r\n                            [username] => pantheon\r\n                            [password] => \r\n                            [host] => database\r\n                            [port] => 3306\r\n                        )\r\n\r\n                )\r\n\r\n        )\r\n)\r\n```\r\n\r\nIt appears the database is running on a separate host called \"database\". \r\nWhen I ping \"database\" from inside the docker machine it shows me an IP address of 198.105.244.228. \r\n\r\nSo I'm assuming there's a way to connect from my host machine to this internal IP address, but I don't quite know the best way of doing that. Does it involve port mapping in VirtualBox, or something separate in docker?  \r\n\r\nI had attempted the following settings in VirtualBox, but that didn't seem to work:\r\n![image](https://cloud.githubusercontent.com/assets/5263371/12656849/14c4c9e4-c5c6-11e5-952b-98a79728be7b.png)\r\n\r\nI must admit, I don't use VMs very often so I'm not entirely sure the best way of dealing with the network settings. \r\n\r\nI tried the Bridged Adapter as well, but still couldn't access that internal IP address.   Any pointers would be helpful. \r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/kalabox/kalabox-app-pantheon/issues/comments/176919397","html_url":"https://github.com/kalabox/kalabox-app-pantheon/issues/85#issuecomment-176919397","issue_url":"https://api.github.com/repos/kalabox/kalabox-app-pantheon/issues/85","id":176919397,"user":{"login":"pirog","id":713424,"avatar_url":"https://avatars.githubusercontent.com/u/713424?v=3","gravatar_id":"","url":"https://api.github.com/users/pirog","html_url":"https://github.com/pirog","followers_url":"https://api.github.com/users/pirog/followers","following_url":"https://api.github.com/users/pirog/following{/other_user}","gists_url":"https://api.github.com/users/pirog/gists{/gist_id}","starred_url":"https://api.github.com/users/pirog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirog/subscriptions","organizations_url":"https://api.github.com/users/pirog/orgs","repos_url":"https://api.github.com/users/pirog/repos","events_url":"https://api.github.com/users/pirog/events{/privacy}","received_events_url":"https://api.github.com/users/pirog/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T19:17:42Z","updated_at":"2016-01-29T19:17:42Z","body":"No worries!\n\nOn Thu, Jan 28, 2016 at 11:58 AM, David Stinemetze <notifications@github.com\n> wrote:\n\n> Oh sorry. Didn't mean to open a new thread. I had assumed it was a\n> pantheon specific issue, so I didn't think to look in the main queue.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/kalabox/kalabox-app-pantheon/issues/85#issuecomment-176376537>\n> .\n>\n"}}