0 Replies Latest reply: Mar 29, 2014 3:18 PM by KbraBass RSS

    MySQL Works on Terminal and Sequel Pro but does't connect to PHP

    KbraBass

      Hi guys, I'm a newbie when it comes to databases and I'm trying to learn at home on my personal OSX Server, I have the Apache/2.2.26 (Unix) PHP/5.4.24 mod_ssl/2.2.26 OpenSSL/0.9.8y DAV/2 Server working from the stock OSX 10.9.2 (Mavericks) Sever.app and "5.6.16 MySQL Community Server".

       

      Apache and PHP are both working well, MySQL works on Terminal with "root" and "custom" users and passwords, Sequel Pro works fine as well both on Socket, Localhost, 127.0.0.1 IP or DNS configurations...

       

      When it comes to PHP though, it simply doesn't connect, I tried to do it via the socket, localhost and DNS, checked the url for the socket on the two PHP.ini files present in OSX and they seem to be fine.

       

      I tried to connect using Adobe Dreamweaver CS6 MySQL Database Connection as well, but it fails (It asks only for a name, MySQL server, Username, Password and Database). I tried Socket, Localhost, 127.0.0.1 IP and DNS on the server field, but all with the same result.

       

      I looked on this and many other communities for a solution for many hours, but all of the people with similar issue seemed to have had a missconfigured PHP.ini file or to not have the correct password, MySQL turned off or something alike...

       

      Can anyone help me out? Do you need more information on my system?

       

      Oh and the error I get is "Could not connect to mysql:php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known" Message was edited by: KbraBass