FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Technical Support » MySQL Hosting

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 02-12-11, 10:06 AM
new member
 
Join Date: Nov 2011
Posts: 7
Default How do I remotely connect to MySQL db (PHP)

Sorry, but I have been searching forums for a while and can't find the answer.

Currently my site is with Streamline.net and I connect to MySQL as follows:
<?php
// Connect to MySQL database
function makeXDBConnection() {
$link = mysql_connect('mysql19.streamline.net', 'dbname', 'p/w')
or die("Couldn't connect to Server.");
mysql_select_db('dbname') or die("Couldn't open database");
}
?>

So what do I use as the first parameter for my MySQL database here at WHUK?

I assume dbname will be the name I created for the database and also the p/w that I created.

Yes I will set Remote Access.

Thanks for any help
David
Reply With Quote

  #2 (permalink)  
Old 02-12-11, 11:26 AM
Support Team
 
Join Date: Feb 2011
Posts: 7
Default

Hello David,

In order to establish remote connection to the database, it is very important to grant the access to the IP of the machine from which database will be accessed.

This can be done by adding the IP in cPanel >> Databases >> Remote Mysql >> Remote Database Access Hosts >> Add Access Host .

You can post support ticket or initiate live chat for further assistance.
Reply With Quote

  #3 (permalink)  
Old 02-12-11, 11:33 AM
new member
 
Join Date: Nov 2011
Posts: 7
Default

Quote:
Originally Posted by key_whuk View Post
Hello David,

In order to establish remote connection to the database, it is very important to grant the access to the IP of the machine from which database will be accessed.

This can be done by adding the IP in cPanel >> Databases >> Remote Mysql >> Remote Database Access Hosts >> Add Access Host .

You can post support ticket or initiate live chat for further assistance.
Thanks,

Yes, I indicated in the last sentance of my query that that will be done, so that isn't the problem - it's the php coding that I'm unsure about as stated previously.

David
Reply With Quote

  #4 (permalink)  
Old 02-12-11, 02:40 PM
Ross's Avatar
Sales Team
 
Join Date: Nov 2010
Posts: 377
Send a message via MSN to Ross Send a message via Skype™ to Ross
Default

Hello David,

I have created a Ticket: TOJ-741-94608 on your behalf and escalated it to the respective dept. Our admins will check the issue and update the same ticket shortly.
__________________
Webhosting UK :: Reseller Hosting | Fully Managed Dedicated Server
"Refer and Win " a Hosting package and domain name
Follow us on Social Networks like Facebook, Twitter and Google+
Reply With Quote

  #5 (permalink)  
Old 02-12-11, 04:34 PM
new member
 
Join Date: Nov 2011
Posts: 7
Default

Well there was a very simple answer to my question.

By trial and error I discovered that the first parameter in the php command mysql_connect('', '', ''), i.e. the MySQL server is
'localhost'
or if accessing remotely, which was my question, it is simply your domain name. i.e.

<?
mysql_connect('xxxxxxx.xxx','yourdbname','yourpass word')
?>
where xxxxxxx.xxx is your domain name.

Hope that helps some-one

David
Reply With Quote

  #6 (permalink)  
Old 02-12-11, 05:00 PM
Ross's Avatar
Sales Team
 
Join Date: Nov 2010
Posts: 377
Send a message via MSN to Ross Send a message via Skype™ to Ross
Default

Keyon had already replied the ticket at 03:44 PM. Please reply to the same email if the issue still exists.
__________________
Webhosting UK :: Reseller Hosting | Fully Managed Dedicated Server
"Refer and Win " a Hosting package and domain name
Follow us on Social Networks like Facebook, Twitter and Google+
Reply With Quote

  #7 (permalink)  
Old 17-12-11, 07:54 AM
new member
 
Join Date: Nov 2011
Posts: 7
Default

Quote:
Originally Posted by Eddie2012 View Post
This can be done by adding the IP in cPanel >> Databases >> Remote Mysql >> Remote Database Access Hosts >> Add Access Host .
Thanks for your response, but that answers a question that wasn't asked!!

I was asking what parameters should be used in the php command mysql_connect('', '', '').

See my reply of 02-12-11 for solution.

David

Last edited by DavidF; 17-12-11 at 07:55 AM. Reason: typing error
Reply With Quote

  #8 (permalink)  
Old 19-12-11, 02:46 PM
Ross's Avatar
Sales Team
 
Join Date: Nov 2010
Posts: 377
Send a message via MSN to Ross Send a message via Skype™ to Ross
Default

One of our support admin has provided all the required information while replying Ticket: TOJ-741-94608. You didn't update the ticket after his reply. Few minutes back, he once again updated the same ticket. Please check the url's mentioned in the email and reply to the same ticket if you need further assistance.
__________________
Webhosting UK :: Reseller Hosting | Fully Managed Dedicated Server
"Refer and Win " a Hosting package and domain name
Follow us on Social Networks like Facebook, Twitter and Google+
Reply With Quote

Reply

Thread Tools
Display Modes

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

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

Forum Jump


All times are GMT. The time now is 07:17 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Reseller Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials