Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
MySQL uses internet sockets to access the database. That implies that, not only can you access the MySQL server from a script from a different computer over the network, you can even access it over the internet, if MySQL is set up to allow login access for remote users. So it's both a blessing and a curse.

See here on how you (or at least someone with database admin access) can allow remote access. 'localhost' means access from the same machine, while '%' means access from anywhere on the internet who can reach the machine (as a firewall might still block it). I think it must be possible to specify a specific host, or even an intranet mask, like '192.168.%', so remote login access is automatically limited even if the firewall allows access; but I've not ever actually tried it, nor have I read anywhere that it is possible. It just looks like a very database-like behaviour to do it like that.

Update Whoops. At the bottom of the same page that I linked to, it clearly describes that it does indeed work as I suspected. I quote:

To create a user who has access from all machines in a given domain (for example, mydomain.com), you can use the % wildcard character in the host part of the account name:
mysql> CREATE USER 'myname'@'%.mydomain.com' IDENTIFIED BY 'mypass';
To do the same thing by modifying the grant tables directly, do this:
mysql> INSERT INTO user (Host,User,Password,...) -> VALUES('%.mydomain.com','myname',PASSWORD('mypass'),...); mysql> FLUSH PRIVILEGES;

In reply to Re: cross platform by bart
in thread cross platform by s.urolagin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (12)
    As of 2014-09-19 15:36 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (142 votes), past polls