Which operating system are you developing on , if you are running on centOs7
configure SELinux permissions: there is some cool suggestion here How do I solve “could not create connection to database” error? - #9 by hany that might help out, could you try @ibacher suggestion first please thanks