[Help] How do I connect website host to database vps host

01/14/2014 02:05 rexorqc#1
Hi guys,

I got a website hosted (.php) on godaddy with a domain name
+ I got a conquer private server hosted on a vps (NFO)

I wanna know how to make the connection from web site to database vps ?
so people will be able to register from website to database

How do I set up my Config.php ?

For this exemple: web host ip: AAAAAA , vps ip: BBBBBB

Mysql user:CCCC pass: DDDD database name:EEEEE

<?php

$serveraddress='';
$serverport='';
$dbhost=''; //Hostname
$dbuser='; //MySql User
$dbpasswd=''; //MySql Password
$dbname=''; //DB For accounts
$description=''; // server description
$servername=''; // Server name appear on pages titles
$serverdesc='';
//////////////////////////////////////////////////////////

$rs = mysql_connect('127.0.0.1', $dbuser, $dbpasswd) or die(mysql_error());

mysql_select_db($dbname,$rs) or die(mysql_error());

if ($_GET['act']=='logout'){
session_destroy();
?>
<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=index.php">
<?php
}

$acc=$_SESSION['acc'];
$uid=$_SESSION['uid'];
?>

Thanks for help !
01/14/2014 05:12 littlechris95#2
You must create a unique user to host, follow the steps:

First step:

Second step:

Third step:

Obs: In "Host" you put the ip of your hosting. After that you use these settings in the Config.php
01/14/2014 12:09 Yupmoh#3
Yeah, He will also need a registration page that would show on his website allowing people to enter their login info and create an account.