{"action":"created","issue":{"url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1196","repository_url":"https://api.github.com/repos/inverse-inc/packetfence","labels_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1196/labels{/name}","comments_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1196/comments","events_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1196/events","html_url":"https://github.com/inverse-inc/packetfence/issues/1196","id":133708593,"number":1196,"title":"MySQL-Socket-Issue on CentOS6","user":{"login":"seteq","id":15156637,"avatar_url":"https://avatars.githubusercontent.com/u/15156637?v=3","gravatar_id":"","url":"https://api.github.com/users/seteq","html_url":"https://github.com/seteq","followers_url":"https://api.github.com/users/seteq/followers","following_url":"https://api.github.com/users/seteq/following{/other_user}","gists_url":"https://api.github.com/users/seteq/gists{/gist_id}","starred_url":"https://api.github.com/users/seteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seteq/subscriptions","organizations_url":"https://api.github.com/users/seteq/orgs","repos_url":"https://api.github.com/users/seteq/repos","events_url":"https://api.github.com/users/seteq/events{/privacy}","received_events_url":"https://api.github.com/users/seteq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-15T13:12:09Z","updated_at":"2016-02-15T14:23:35Z","closed_at":null,"body":"I tried to install Packetfence on a clean and updated CentOS6 by using yum.\r\nI enabled VLAN enforcement and added the three required network interfaces.\r\nOn the next page the install wizard notified me that mysql has not been started.\r\nAfter starting mysql I tried to connect as root without password which raised an error.\r\nOn the command line connecting mysql as root just worked fine.\r\n\r\nI started digging in **/usr/local/pf/logs/httpd.admin.log** and here it says:\r\n`ERROR: Caught error DBI connect('database=pf;host=localhost;port=3306','pf',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)`\r\n\r\nSo it's trying to use the socket. That would be fine, but unfortunately CentOS seems to be a bit restrictive on that socket file in /var/lib/mysql\r\n```\r\ndrwxr-xr-x+  5 mysql mysql     4096 Feb 15 06:59 .\r\ndrwxr-xr-x+ 24 root  root      4096 Feb 15 05:59 ..\r\nsrwxr-xr-x   1 mysql mysql        0 Feb 15 06:49 mysql.sock\r\n```\r\n\r\nSo I changed permissions to 0777 on that socket file and then I was able to proceed the install wizard.\r\n\r\nIt seems a bit strange for CentOS to have a limitation so that only the mysql user can use the socket. I wasn't able to find a way of changing the default permissions of the mysql socket. Whenever you restart the mysql server it gets recreated with 0755 and blocking access.\r\nAs an addition the mysql client library internally re-routes connections to the hostname \"localhost\" directly to the socket, which does not work in that case...\r\n\r\nSo I ended in changing the mysql hostname to 127.0.0.1 in pfconfig.conf\r\nPlease consider changing mysql 'localhost' to '127.0.0.1'\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/inverse-inc/packetfence/issues/comments/184227270","html_url":"https://github.com/inverse-inc/packetfence/issues/1196#issuecomment-184227270","issue_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1196","id":184227270,"user":{"login":"julsemaan","id":3857942,"avatar_url":"https://avatars.githubusercontent.com/u/3857942?v=3","gravatar_id":"","url":"https://api.github.com/users/julsemaan","html_url":"https://github.com/julsemaan","followers_url":"https://api.github.com/users/julsemaan/followers","following_url":"https://api.github.com/users/julsemaan/following{/other_user}","gists_url":"https://api.github.com/users/julsemaan/gists{/gist_id}","starred_url":"https://api.github.com/users/julsemaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julsemaan/subscriptions","organizations_url":"https://api.github.com/users/julsemaan/orgs","repos_url":"https://api.github.com/users/julsemaan/repos","events_url":"https://api.github.com/users/julsemaan/events{/privacy}","received_events_url":"https://api.github.com/users/julsemaan/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T14:23:35Z","updated_at":"2016-02-15T14:23:35Z","body":"The solution won't be to change it to 127.0.0.1 as it previously worked with the socket and so we must keep it this way.\r\n\r\nPlease post the output of the following command : \r\n`# sestatus`"}}