Re: [PHP] How to connect Web database
You have to use mysqldump utility to make script, then you can put it into your PHP script and run that script: ?php $sql = PRODUCED SCRIPT BODY GOES HERE; mysql_query($sql); ? or just dump your database directly to remote server by running mysqldump with parameters Host and some other. The only difficulty could be, that remote provider could reject all emote connections :(( the third way is to place PHP script on remote mashine and to connect to your local MySQL server and just make some SELECT-INSERT. Here you can have the same problem as in previous: proveder can reject all connection aoutside their box :((( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to connect Web Database from local machine
I am having MySQL database on web. (eg., at www.lmcr.net). What is the PHP script which I can connect the MySQL table from my Local machine. Can anybody help me. Well, most hosting companies do not allow remote access to the MySQL server, but if you're does, then you connect the same way as usual... $link_id = mysql_connect(mysql.yourdomain.com,user,password); You just pass the IP or name of your MySQL server in the mysql_connect function. To also connect to your local database, just use $link_id2 = mysql_connect(localhost,user,password); And then you have a connection to each one open. Be sure to use the appropriate $link_id in your queries. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php