August 27th, 1999, 08:36 PM
I was wondering something. Ok, heres the scenario. My host is 1.) fixing to change and 2.) the new one might not let me use their mySQL server. so heres the question. If i have a friend that has a host that lets him use mySQL is it at all possible to connect to his mySQl server from my server? I am going to look into this further my self(have a little already) so i might figure it out b4 i get a reply but thank you.
August 29th, 1999, 01:57 AM
Hey, that's no problem.
Right now I have a host running MySQL at work and can access it thru ODBC from home. I can run an Access application, or access it from my Linux server at home.
What's important is your security settings in MySQL. Be sure to read the security portion of the manual. There are some pretty good examples of setting priviledges.
Normally the default MySQL installation is setup for access only from the local host. You will need to add a new user that can access the database(s) from any host, or a specific host.
August 29th, 1999, 02:57 AM
lets see, ok, if i get my friend to ask his admin to do this what would be the syntax to tell my PHP3 script to connect to his server and stuff?
thank you very much.
August 29th, 1999, 06:12 PM
Ahh the beauty of TCP/IP - it doesn't care where the assorted parts are located.
All you gotta do is change the parameters of your 'mysql_connect' statement:
mysql_connect("<your friend's hostname or IP", "<login name set up for you>", "<login password>");