Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Registration MySQL

Status
Not open for further replies.
Skilled Illusionist
Joined
Apr 7, 2012
Messages
312
Reaction score
121
I have a Web Host and a dedicated server. when people register i need it to go to the mysql database on the server and not the web host. If that is right, would the code look something like this?

Code:
$mysqlhost = "DEDICATED SERVER IP"; //Put your MySQL IP/URL here. (Usually localhost or 127.0.0.1)
$mysqluser = "root"; //Put your MySQL username here.
$mysqlpass = "pass"; //Put your MySQL password here.
$mysqldb = "wm"; //Put your MySQL database name here.

And the config.php would look like this?

Code:
<?

	$DBHost = "DEDICATED SERVER IP";  // localhost or your IP
	$DBUser = "root";  // Database user
	$DBPassword = "pass";  // Database password
	$DBName = "wm";  // Database name
	
?>

And i would be putting these files on the WEB HOST's server.


If not, then can someone point me in the right direction?
 
Skilled Illusionist
Joined
Nov 25, 2010
Messages
341
Reaction score
32
IF you are gonna host the script on your webhost then 1. You point the Host to your server Mysql 2. Setup a user just for it on your database on server for security 3. Open the mysql port on your server but use iptables firewall to only accept your webhost IP or your leaving your mysql open to the world and THAT is a very BAD idea

or
Use your apache on your server to host the registration script and just use php includes or iframes to include that page in your webpage (much more secure way of doing it)
 
Skilled Illusionist
Joined
Apr 7, 2012
Messages
312
Reaction score
121
IF you are gonna host the script on your webhost then 1. You point the Host to your server Mysql 2. Setup a user just for it on your database on server for security 3. Open the mysql port on your server but use iptables firewall to only accept your webhost IP or your leaving your mysql open to the world and THAT is a very BAD idea

or
Use your apache on your server to host the registration script and just use php includes or iframes to include that page in your webpage (much more secure way of doing it)

do you have a little guide for the 2nd option? i feel like that would be best
 
Skilled Illusionist
Joined
Nov 25, 2010
Messages
341
Reaction score
32
If you canr get it from the iframes site guide get hold of me later today ill help u real quick
I have a teamspeak server can cone on
zxgamers.sytes.net. default port
If anyone needs a hand that is best place besides QQ to get hold of me

JD Gaming at its Best
brought to you by Aristotle!
 
Status
Not open for further replies.
Back
Top