{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik/issues/8049","labels_url":"https://api.github.com/repos/piwik/piwik/issues/8049/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/8049/comments","events_url":"https://api.github.com/repos/piwik/piwik/issues/8049/events","html_url":"https://github.com/piwik/piwik/pull/8049","id":85777209,"number":8049,"title":"Support for MySQL and SSL Connections (fixes #7039)","user":{"login":"ktroska","id":12298933,"avatar_url":"https://avatars.githubusercontent.com/u/12298933?v=3","gravatar_id":"","url":"https://api.github.com/users/ktroska","html_url":"https://github.com/ktroska","followers_url":"https://api.github.com/users/ktroska/followers","following_url":"https://api.github.com/users/ktroska/following{/other_user}","gists_url":"https://api.github.com/users/ktroska/gists{/gist_id}","starred_url":"https://api.github.com/users/ktroska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktroska/subscriptions","organizations_url":"https://api.github.com/users/ktroska/orgs","repos_url":"https://api.github.com/users/ktroska/repos","events_url":"https://api.github.com/users/ktroska/events{/privacy}","received_events_url":"https://api.github.com/users/ktroska/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-06T16:25:27Z","updated_at":"2015-06-09T10:57:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/8049","html_url":"https://github.com/piwik/piwik/pull/8049","diff_url":"https://github.com/piwik/piwik/pull/8049.diff","patch_url":"https://github.com/piwik/piwik/pull/8049.patch"},"body":"Hello,\r\nMy first ever open source pull request I am beginner but I use Piwik in work and want to make it even better, so please be nice but say if I did it wrong and how I should fix it.\r\n\r\nI added the support of ssl for mysqli Adapter. From my point the needed options are ssl-ca and ssl-capath but this can vary on different platforms.\r\n\r\nIt would be nice to note that mysqli will silently fall back to non ssl connection if server don't support ssl.\r\n\r\nPls. let me know if this will be good, if yes i can think about adding options for sql settings to installer. \r\n\r\nMYSQLI_CLIENT_SSL in mysqli_real_connect is completely optional but would be nice to have it in case there will be some changes in mysqli.\r\n\r\n\r\nfixes #7039"},"comment":{"url":"https://api.github.com/repos/piwik/piwik/issues/comments/110317980","html_url":"https://github.com/piwik/piwik/pull/8049#issuecomment-110317980","issue_url":"https://api.github.com/repos/piwik/piwik/issues/8049","id":110317980,"user":{"login":"ktroska","id":12298933,"avatar_url":"https://avatars.githubusercontent.com/u/12298933?v=3","gravatar_id":"","url":"https://api.github.com/users/ktroska","html_url":"https://github.com/ktroska","followers_url":"https://api.github.com/users/ktroska/followers","following_url":"https://api.github.com/users/ktroska/following{/other_user}","gists_url":"https://api.github.com/users/ktroska/gists{/gist_id}","starred_url":"https://api.github.com/users/ktroska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktroska/subscriptions","organizations_url":"https://api.github.com/users/ktroska/orgs","repos_url":"https://api.github.com/users/ktroska/repos","events_url":"https://api.github.com/users/ktroska/events{/privacy}","received_events_url":"https://api.github.com/users/ktroska/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T10:57:16Z","updated_at":"2015-06-09T10:57:16Z","body":"> Finally:\r\n\r\nWell since I did mysqli first i did not notice that  Pdo can be easily done in piwik/core/Db/Adapter/Pdo/Mysql.php. So no Zend modification for this.\r\n\r\nIf it comes to Mysqli.... we need to call mysqli_ssl_set() between mysqli_init() and @mysqli_real_connect() \r\nAnd in zend there is only mysqli_options() which won't help us:\r\nhttps://github.com/piwik/piwik/blob/master/libs/Zend/Db/Adapter/Mysqli.php#L300\r\nsame upstream:\r\nhttps://github.com/zendframework/zend-db/blob/master/src/Adapter/Driver/Mysqli/Connection.php#L115\r\nMaybe there is something I missed.\r\nIf there is no way I will think of changing the code to be compatible with Zend style and more object oriented and push it upstream to Zend meanwhile we will have it working in Piwik.\r\n\r\n> system check \r\n\r\nI started working on it based on LoadDataInfileCheck.php after work and some sleep I think I will have it ready.\r\n\r\n> Test \r\n\r\nI got general idea now to coding.\r\n\r\nI can't thank you enough for sticking with me. :+1: "}}