Web Host Chat
Bringing Hosts & Customers together since 2001
Home QLinks Members Your Profile Register FAQ's Hosts Only Area SMS Alerts Advertising
User Information
»REGISTER NOW!

Go Back   Web Host Chat > Web Hosting Chat > Business and Technical Advice
Reply
 
LinkBack Thread Tools
Old 16th April 2008   #1 (permalink)
I am Staff at
Naglotech
About My Company!


Basic Host
andyb28's Avatar
Join Date: Dec 2004
Location: Essex
Age: 35
Posts: 1,180
andyb28 is on a distinguished road
Php - Mysql Problem

Can anyone help me with this, it's driving me nuts

We have a MySQL database running on a Cpanel box which is allowing remote connections. Tested from multiple machines and it works fine.

Then we have a 2nd Linux server with no cpanel that needs to connect to this server via a php page.

The error the php page shows is this
Could not connect to mysql
MySQL Error: Can't connect to MySQL server on 'awebsite' (13)
MySQL ErrorNo: 2003

Yet, if we run the test code like this php /var/www/html/mysql_test.php it works

Anyone?
__________________
Andy Booth

Naglotech Ltd Webhosting, Colocation, Consultancy
Cybernetic-Servers Game Servers, Dedicated Servers

Company No : 5326296
AS35327
__________________
Web Host - VIP Member
andyb28 is offline   Reply With Quote
Old 16th April 2008   #2 (permalink)
I am Staff at
NetSumo
About My Company!

Certified Host
alexcf's Avatar
Join Date: Feb 2004
Posts: 467
alexcf is on a distinguished road
Quite an easy one really!

Anyway, sort those bits and pieces out for me.
__________________
Alex Cruz Farmer
NetSumo Limited
alex.cf@netsumo.com
__________________
Web Host - Certified Member
alexcf is offline   Reply With Quote
Old 16th April 2008   #3 (permalink)
othellotech's Avatar
Join Date: Mar 2002
Location: London, United Kingdom
Age: 38
Posts: 4,251
othellotech is on a distinguished road
Quote:
Originally Posted by andyb28 View Post
The error the php page shows is this

-snip-

Yet, if we run the test code like this
permissions

apache is not being allowed to access the remote sql server which will be restrictions in the php.ini or permissions of the apache user.
__________________
Rob Golding, Othello Technology Systems Ltd AS29527 Company#03894981 VAT#GB-782561410. T:0871 277 6875 F:0871 277 6875
domains email forwarding resellers ecommerce colocation rackspace ip transit secondary mx/dns datacentre ih online/offsite backup
* OthelloHosts.net CPanel/WHM, H-Sphere, Plesk, Ensim, DirectAdmin High-Availability Professional Email / Web Hosting
* OthelloVPS.net Managed Xen4 Enterprise Virtual Private Servers and Dedicated Servers
# Currently buying 123-reg, ukreg, heart-internet and enom domain resellers - www.hostacquisitions.co.uk
__________________
Web Host - VIP Member
othellotech is offline   Reply With Quote
Old 16th April 2008   #4 (permalink)
I am Staff at
Serverstream Ltd
About My Company!


Certified Host
JamieBeeston's Avatar
Join Date: Aug 2005
Posts: 3,394
JamieBeeston is on a distinguished road
or SELinux
__________________
Register1.net
.eu £7.95
.com .net .org .uk £5.48
Premium Virtual Hosting from £33 a year
Quad Core 2.5Ghz 1GB 250GB Xeon Servers from £49
Company reg: 04186664 VAT reg: GB 815 5899 88
[Any views expressed on this forum are my own, and may not represent the views of any organisation that I own or am connected with.]
__________________
Web Host - VIP Member
JamieBeeston is offline   Reply With Quote
Old 16th April 2008   #5 (permalink)
I am Staff at
UH Hosting Ltd
About My Company!


Certified Host
Join Date: May 2003
Location: UK, Luton
Age: 22
Posts: 1,879
James[UH] is an unknown quantity at this point
Urm, I think its unlikely to be anything in php.ini ...

I don't think there's anything in there by default which will stop remote MySQL functioning.

Either:

1) Firewalled machine, the system running MySQL, the web server or both
2) Permissions wrong on the MySQL box
3) Incorrect MySQL client in PHP - But you'd expect to see an incompatible error if this is the case

Can you connect via a shell to the remote MySQL server?
__________________
James Smith,
UK Web Hosting, Reseller Hosting, Dedicated Servers - All with ultra fast support response times!
Join UH Hosting Ltd's Affiliate Program - Starting at 10% commission

Try our Dedicated Server Configuration Tool

VAT: 828 2971 96 Company Number: 04928706
__________________
Web Host - VIP Member
James[UH] is online now   Reply With Quote
Old 17th April 2008   #6 (permalink)
I am Staff at
Naglotech
About My Company!


Basic Host
andyb28's Avatar
Join Date: Dec 2004
Location: Essex
Age: 35
Posts: 1,180
andyb28 is on a distinguished road
Doh, it was SELinux, sorry, I should have checked that first.
__________________
Andy Booth

Naglotech Ltd Webhosting, Colocation, Consultancy
Cybernetic-Servers Game Servers, Dedicated Servers

Company No : 5326296
AS35327
__________________
Web Host - VIP Member
andyb28 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ipod Win XP problem mnowell Mp3 and Audio 9 11th August 2006 01:44 PM


Some great companies!


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0