Website Database linking to Game Database

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
ImperiumWesker
New to forums
New to forums
Posts: 3
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue Dec 10, 2019 12:45 pm

Website Database linking to Game Database

Post by ImperiumWesker »

Okay, so I have a game running on my server, it uses MSSQL and does require the player to have a username and password to login to the game.

My website, is on a separate Database on the shared server for NFO, which I believe is running MySQL(?)

My goal: Have someone register on my website, with a username and password. Once that happens, the information is instantly sent to the game's database, the same username, but the password is sent as a hash. My server requires a hash password, but the user still types in their normal password.

Does anyone have any ideas on how we can achieve this?
User avatar
Spray
Former staff
Former staff
Posts: 630
Joined: Wed Dec 28, 2011 10:41 pm
Location: Oregon

Re: Website Database linking to Game Database

Post by Spray »

This is very doable, you'll just need to know a few things.

1. Does the MSSQL database for your game server allow remote connections? If not, you will need to enable that.

More information on enabling this can be found here: https://docs.microsoft.com/en-us/sql/da ... rver-ver15

2. You'll need to be familiar with the registration flow for your website. If you've coded this, then great, if not, you'll need to see if the software allows some type of hook for the registration already, or you'll need to code one in yourself to the section of code that handles registration. After a successful registration attempt, this hook/custom code will need to open a remote connection to the MSSQL server, and store the username and password. I'll assume your website is using PHP with us, which allows for fairly easy access to MSSQL via their pdo_dblib module: https://www.php.net/manual/en/ref.pdo-dblib.php

3. You'll need to know the hashing mechanism used for the game server (if you're integrating with an existing login system) and use the same hashing technique when creating the code that handles storing the password into the database.
Post Reply