[Help] Databases

01/31/2012 17:56 kyle191#1
Hello, I have a question. I wish to host my website on an online web server but my private server is installed on my localhost. Is there a program that will send updates to the database from my localhost to the webserver which is the same database.

Example;

Character was created on the website, Database information from the website updates the database on localhost immediately.

There is probably a much simpler and easier way todo this.

Thanks.
Kyle.

I used Workbench, I've connected it remotely with my webserver database. How can I connect my source to the webserver database? I've edited the config and it's all correct as im aware (it's the same info i used with workbench for remote connection) I've allowed ALL connections to my webserver that is hosted online.
01/31/2012 20:12 pro4never#2
Using a database hosted on an external machine is definitely not recommended.

The time it takes for database queries to run will increase dramatically.

Alternatively you could set up a connection in your database install so that it can be accessed from your webhost. Then simply alter your register script so it connects to your local host's ip for its database functionality (to register accounts and such).

Note: Will require some port forwarding at least.
01/31/2012 20:35 kyle191#3
Quote:
Originally Posted by pro4never View Post
Using a database hosted on an external machine is definitely not recommended.

The time it takes for database queries to run will increase dramatically.

Alternatively you could set up a connection in your database install so that it can be accessed from your webhost. Then simply alter your register script so it connects to your local host's ip for its database functionality (to register accounts and such).

Note: Will require some port forwarding at least.
Yeah I was worried about the delay for executing queries. I will have to do more research on how, a webhost can connect to my localhost database(navicat or workbench)
01/31/2012 20:42 pro4never#4
Just make an account in sql that allows a connection from outside. Set up its permissions, username and password and use that + your ip to connect from webhost via your php script.

Then make sure ports are forwarded properly so it can bypass your firewall and you're good to go.
01/31/2012 20:50 kyle191#5
Quote:
Originally Posted by pro4never View Post
Just make an account in sql that allows a connection from outside. Set up its permissions, username and password and use that + your ip to connect from webhost via your php script.

Then make sure ports are forwarded properly so it can bypass your firewall and you're good to go.
That makes everything much more clear, Just now I got to edit the register.php file, and make this execute to my database when submitted.

Would I just need to Port Forward 3306?
01/31/2012 23:56 Spirited#6
Watch out with how you set up your php if you're going to have an open sql connection...
If you expose too much data in your php/javascript, someone can just come along and change their gears, level, account data, etc.