- @jcayzac Have you looked at their implementation BTW? It's terrible. Fitting for Mixi. >>
- RT @serkantoto: Mixi introduces location-based service. Good to see it didn't take them 2 years now to copy Facebook, like with apps. >>
- RT @AnoshIrani: Overheard today at visa office: Officer: "What do you for a living?" Young lady: "I'm a poet." Officer: "What do you d ... >>
- @TokyoDan I love you but please don't retweet 10 things frmo the same person in a row, unless it is the delightful author of Tokyo Vice. >>
- @jcayzac cheap, reliable, fast - pick two. (JR is quite cheap in Tokyo, believe it or not) >>
I had the most irritating bug in PHP – or so I thought. I simply was unable to connect to the database. I spent the entire weekend recoding and simplifying until I gave up and made a simple connect statement. I kept getting the error message “Can’t connect to MySQL server on (Remote IP) (13)”.
(The “13″ is really confusing and led me down the wrong path. It is actually the result of error code 2003.)
Anyway to save you time, log into your Centos/SE Linux server and type in:
/usr/sbin/setsebool -P httpd_can_network_connect=1
This is basically a setting in SELinux that enables remote connections and is off by default. (Remind me to flay the guy who administers the network). Thanks to the OSCommerce user “ericp502″ who posted the solution.
Comments (2)






OMG! 2 weeks ive been trying to fix this. i have worked with mysql servers before but never on CentOS. i didn’t even consider that being the problem.
thank you so much for this post!
THANK YOU SO MUCH for posting this. I was having serious issues with exactly this same problem on RHEL5 with a remote DB. This fixed the problem.