Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-28-2005, 09:00 PM Networking php
Experienced Talker

Posts: 36
Trades: 0
Hi:

As a final phase of a project on which I am working on, I must connect 4 computers all sharing the same database. How should I go about doing this and avoid pitfalls right from the start.

Any suggestions however minimal are most welcome. Thanks for taking the time to answer this question!
common_sense is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-28-2005, 09:08 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
I am unsure how you expect to work this; or rather your tutor, but I would create one system as a server. This would control the database and allow access to the other three computers who log on to it.

The reason I would suggest this route is simply for security and stability. If you had 4 systems who could connect and edit a databse, you could have a nightmare on your hands; which is a possible pitfall.

Steve.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 03-28-2005, 10:48 PM
Experienced Talker

Posts: 36
Trades: 0
Thanks Steve:

Anything else you would like to add for security? I'm using Apache 2.0 as the server. Thanks for the tip!
common_sense is offline
Reply With Quote
View Public Profile
 
Old 03-30-2005, 12:17 PM
simptech's Avatar
Skilled Talker

Posts: 81
Location: Cape Coral, Florida, United States
Trades: 0
You will need to add all workstation IP addresses and/or computer names to the "mysql -> user" table, then grant them access to specific databases by adding corresponding records for them in "mysql -> db" table.

This way, only those workstations with host connection priviledges will be able to connect to the mysql server.

We have done this on occassion when a site did not have MySQL installed on their server and they needed to piggy-back on ours
__________________

Please login or register to view this content. Registration is FREE

FREE PHP scripts for your website!
simptech is offline
Reply With Quote
View Public Profile
 
Old 03-30-2005, 12:35 PM
Experienced Talker

Posts: 36
Trades: 0
Quote:
Originally Posted by simptech
You will need to add all workstation IP addresses and/or computer names to the "mysql -> user" table, then grant them access to specific databases by adding corresponding records for them in "mysql -> db" table.

This way, only those workstations with host connection priviledges will be able to connect to the mysql server.

We have done this on occassion when a site did not have MySQL installed on their server and they needed to piggy-back on ours

Will I need to install anything on their respective computers? I mean like a form to validate, or something else? If I do use a form, how do I connect it to the server? In other words how do I make sure that by using the form, the person can have direct access to the database (as long as password and username is validated)?
common_sense is offline
Reply With Quote
View Public Profile
 
Old 03-30-2005, 12:51 PM
simptech's Avatar
Skilled Talker

Posts: 81
Location: Cape Coral, Florida, United States
Trades: 0
no forms necessary. just need the db connection to look for "IP_ADDRESS:3306" instead of "localhost"

ie:
mysql_connect("192.168.1.102:3306", "username", "password");
__________________

Please login or register to view this content. Registration is FREE

FREE PHP scripts for your website!
simptech is offline
Reply With Quote
View Public Profile
 
Old 03-31-2005, 09:10 AM
Experienced Talker

Posts: 36
Trades: 0
Quote:
Originally Posted by simptech
no forms necessary. just need the db connection to look for "IP_ADDRESS:3306" instead of "localhost"

ie:
mysql_connect("192.168.1.102:3306", "username", "password");

Sorry to ask another dumb question: The above will have to be done on the server right?
What I mean is, do I have to write the code to look for the incoming IP's?

Please don't laugh: How will other users (on other workstations) have access to the database? I know you mentioned something like this before - do I have to set up something on their respective workstations (a shortcut, perhaps)?

I'm not getting a clear picture of what I need to do, sorry.

Thanks for being patient and your help!

Last edited by common_sense; 03-31-2005 at 09:27 AM..
common_sense is offline
Reply With Quote
View Public Profile
 
Old 04-06-2005, 10:30 AM
Experienced Talker

Posts: 36
Trades: 0
Hi guys, I worked on it over the weekend and finally cracked what I had to do about connecting the 3 other units to the server. It was simpler than I thought. Thanks to all of you.

Special thanks to Simptech --> tips really helped!
common_sense is offline
Reply With Quote
View Public Profile
 
Old 04-06-2005, 10:58 AM
simptech's Avatar
Skilled Talker

Posts: 81
Location: Cape Coral, Florida, United States
Trades: 0
Glad we were able to help
__________________

Please login or register to view this content. Registration is FREE

FREE PHP scripts for your website!
simptech is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Networking php
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53262 seconds with 12 queries