Professional Web Applications Themes

Updating record remotely from a script? - MySQL

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!...

  1. #1

    Default Updating record remotely from a script?

    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 Guest

  2. #2

    Default Re: Updating record remotely from a script?

    "Burma Jones" <somebodysomedomain.not> wrote in message
    news:MKidndgERPXhYzzeRVn-tAcomcast.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.
    [url]http://www.gnu.org/software/wget/wget.html[/url]
    [url]http://lynx.isc.org/[/url]
    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:
    [url]http://www.windowsitpro.com/Web/Article/ArticleID/16048/16048.html[/url]

    There's also a Windows C/C++ API for accessing HTTP resources
    programmatically:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/winhttp.asp[/url]

    Regards,
    Bill K.


    Bill Karwin Guest

  3. #3

    Default Re: Updating record remotely from a script?

    >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
    Gordon Burditt Guest

  4. #4

    Default Re: Updating record remotely from a script?

    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
    Dikkie Dik Guest

  5. #5

    Default Re: Updating record remotely from a script?

    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: [url]http://homepage.ntlworld.com/b.wakem/myemail.png[/url]
    Brian Wakem Guest

  6. #6

    Default Re: Updating record remotely from a script?

    "Brian Wakem" <noemail.com> wrote in message news:40ffh3F1adq7dU1individual.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: [url]http://homepage.ntlworld.com/b.wakem/myemail.png[/url]
    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
    Burma Jones Guest

Similar Threads

  1. Problems when updating record
    By The Ox in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 25th, 08:44 AM
  2. Updating a NEW record
    By -- in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 9th, 05:49 PM
  3. Question about Updating a record
    By Jeremy F in forum Coldfusion Database Access
    Replies: 4
    Last Post: April 21st, 05:36 PM
  4. Updating MySQL record
    By Dag Eilertsen in forum PHP Development
    Replies: 2
    Last Post: August 31st, 05:36 PM
  5. Updating a single record on a form
    By chas in forum Microsoft Access
    Replies: 0
    Last Post: August 4th, 03:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139