Page 1 of 1

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

Posted: Mon Aug 29, 2005 6:02 am
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

Posted: Mon Aug 29, 2005 7:03 am
by feyd
it has nothing to do with language, but everything to do with MySQL's protection.

Posted: Mon Aug 29, 2005 7:15 am
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'

Posted: Mon Aug 29, 2005 7:47 am
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".

Posted: Mon Aug 29, 2005 7:50 am
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