At 10:15 PM +0700 2/3/01, Kiky wrote:
>Thank you for your reply :-)
>> Yes, you can add a mysql user that has access to mysql server from the
>> windows host and use this user to create the connection.
>## Is it possible to do this in PHP under Windows, without installing
>mysql driver for ODBC, or any other additional installation ?
>Can I just do the same way of connection to mysql database, just like
>I use in PHP under Linux ?
>mysql_connect("127.0.0.1", "root", "");
Just replace '127.0.0.1' (a.k.a. 'localhost') with the database
server's ip address or name. Some things you have to be sure of to do
(1) The database server machine's mysql wasn't started with
--skip-networking (I'm pretty sure that's the parameter); if it was,
MySQL won't be listening to the internet at all, and will need to be
restarted without that parameter.
(2) Make sure the server's permission tables will allow access from
your web server - see the GRANT command;
(3) Make sure the database server isn't behind a firewall or
something that restricts internet access to the MySQL port (normally
If all these conditions are met, your the database server can be
anywhere. Keep in mind, though, that if your query returns a large
number of results, response will be limited by the speed of the
network(s) between the two machines.
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg University of California, Davis |
| sbedberg@stripped Computer Consultant |
| http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+