must I add ip address of a PC for remote connection?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
aaaphp000000
Forum Newbie
Posts: 22
Joined: Mon Aug 29, 2005 5:39 am

must I add ip address of a PC for remote connection?

Post by aaaphp000000 »

hi,
I want to connect to my mysql database (on unix host) remotely, my host-master told me that I must add ip address of the PC (which tries to connect to mysql database) to mysql database.

i think it is not very convinient (but saft).

must we do that for all launguages (i.e. c/c++ and php)?

thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it has nothing to do with language, but everything to do with MySQL's protection.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You add the IP to MySQL, not to the frontend app.

If all those languages you wish to use are on the same machine then it's just one IP to add, otherwise, you need to add the IP of each machine.

Code: Select all

GRANT ALL PRIVILEGES ON databasename.* TO 'username'@'IP.ADD.RE.SSS' IDENTIFIED BY 'password'
aaaphp000000
Forum Newbie
Posts: 22
Joined: Mon Aug 29, 2005 5:39 am

Post by aaaphp000000 »

thinks,
do you think all PCs, for example, in a lab of a univesity have the same ip address to remote mysql server which is not inside the university?

what does a maximum group of PCs (with same ip address) mean?
i.e. all PCs are connect to same router or a network?

i need to add ip address for my customers (who use our C++ software from their PCs), so I need basc knowledge for the range of "same ip address".
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

there is no range to an IP address, alone. It's a finite reference. Given the IP is actually a gateway of some kind, there can be unlimited numbers of computers behind it, provided the gateway has a NAT system
Post Reply