vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a MySQL database on my ISP's Linux server. Can anyone tell me if it would be possible to update a specific record remotely without any user interaction? In other words, from a Windows script or batch file do the update without any interaction from myself. I was thinking of passing the update variables in a URL to a PHP script on the server, but that would open a browser window on the client which I don't want to do. Perhaps some other protocol or ODBC or something? Thanks! |
| |||
| "Burma Jones" <somebody@somedomain.not> wrote in message news:MKidndgERPXhYzzeRVn-tA@comcast.com... > I have a MySQL database on my ISP's Linux server. Can anyone tell me if > it would be > possible to update a specific record remotely without any user > interaction? In other words, > from a Windows script or batch file do the update without any interaction > from myself. > I was thinking of passing the update variables in a URL to a PHP script on > the server, > but that would open a browser window on the client which I don't want to > do. > Perhaps some other protocol or ODBC or something? Thanks! Maybe. Depends on your ISP's firewall configuration. Connecting from a client machine to the MySQL server requires the network port 3306 be open on the ISP's server and firewall, to permit the connection. (3306 is the default server port for MySQL, but it can be configured to a different port.) As far as I know, this is the case regardless of whether one uses a mysql command-line client, or the MyODBC driver, or other clients. Often ISP's are reluctant to enable ports such as this one, even if it's a relatively well-known service. It's one more protocol and service that they now have to be experts in, to watch for security risks. Their users might inadvertently create security holes. There are tools to allow you to automate the task of making an HTTP request, that don't require the client machine open a GUI browser. "wget" and "lynx" are examples. http://www.gnu.org/software/wget/wget.html http://lynx.isc.org/ Note: these are both licensed under the GPL, so they cannot be distributed with non-GPL products. Here's an article about a command-line Windows HTTP client from Microsoft, included in the Windows 2000 resource kit: http://www.windowsitpro.com/Web/Arti...048/16048.html There's also a Windows C/C++ API for accessing HTTP resources programmatically: http://msdn.microsoft.com/library/de...ml/winhttp.asp Regards, Bill K. |
| |||
| >Connecting from a client machine to the MySQL server requires the network >port 3306 be open on the ISP's server and firewall, to permit the >connection. (3306 is the default server port for MySQL, but it can be >configured to a different port.) As far as I know, this is the case >regardless of whether one uses a mysql command-line client, or the MyODBC >driver, or other clients. And that's not ALL that is required. MySQL does not by default permit network access to the database. The ISP needs to GRANT you permission to use the database from the IP you are connecting from in MySQL itself. It is possible to grant access from anywhere, but this opens up a number of security issues. It also requires more administrative work from the ISP. Typically, they grant access from the host that your web site is on, and that's all. Also, they have to allow access for port 3306 through the firewall for any IP that *any* customer is allowed to use (assuming a shared database). >Often ISP's are reluctant to enable ports such as this one, even if it's a >relatively well-known service. It's one more protocol and service that they >now have to be experts in, to watch for security risks. Their users might >inadvertently create security holes. This is especially an issue if the ISP's customers are using their web sites to conduct E-commerce, and the databases contain stuff like credit card numbers. The ISP may end up involved for providing inadequate security if there's a major breach. Gordon L. Burditt |
| |||
| Burma Jones wrote: > I have a MySQL database on my ISP's Linux server. Can anyone tell me if > it would be possible to update a specific record remotely without any > user interaction? In other words, from a Windows script or batch file > do the update without any interaction from myself. I was thinking of > passing the update variables in a URL to a PHP script on the server, but > that would open a browser window on the client which I don't want to > do. Perhaps some other protocol or ODBC or something? Thanks! I think you can do that with "scheduled tasks" in Windows or CRON on Linux. You can probably run the script minimized. Best regards |
| |||
| Burma Jones wrote: > I have a MySQL database on my ISP's Linux server. Can anyone tell me if > it would be possible to update a specific record remotely without any user > interaction? In other words, from a Windows script or batch file do the > update without any interaction from myself. I was thinking of passing the > update variables in a URL to a PHP script on the server, but that would > open a browser window on the client which I don't want to do. perl -MLWP::Simple -e 'get("http://www.mysite.com/myscript.php?a=1&b=2")' -- Brian Wakem Email: http://homepage.ntlworld.com/b.wakem/myemail.png |
| ||||
| "Brian Wakem" <no@email.com> wrote in message news:40ffh3F1adq7dU1@individual.net... > Burma Jones wrote: > >> I have a MySQL database on my ISP's Linux server. Can anyone tell me if >> it would be possible to update a specific record remotely without any user >> interaction? In other words, from a Windows script or batch file do the >> update without any interaction from myself. I was thinking of passing the >> update variables in a URL to a PHP script on the server, but that would >> open a browser window on the client which I don't want to do. > > > perl -MLWP::Simple -e 'get("http://www.mysite.com/myscript.php?a=1&b=2")' > > > > -- > Brian Wakem > Email: http://homepage.ntlworld.com/b.wakem/myemail.png Thanks folks for all your suggestions. I like the Perl suggestion best but Perl can't be installed on some of the machines I'm using. I also like Wget but even as small as it is, it still seemed to large for what I need it for. So I found an IIS Resource Kit Tool called TinyGet which does the job and is only 87K. Cheers |