Closed Thread
Results 1 to 8 of 8

Thread: Mysql Connection

  1. #1
    keaysma29 is offline x10Hosting Member keaysma29 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Question Mysql Connection

    This has probably been asked, but I couldnt find the answer:
    I have got a free host ngsh.x10.mx, and I tried to connect to this adress from my MYSQL Worbench (5.2). I just changes the adress from localhost to the adress, but it just gave me "error: 2" any help, thank you in advance.

  2. #2
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: Mysql Connection

    Quote Originally Posted by keaysma29 View Post
    This has probably been asked, but I couldnt find the answer:
    I have got a free host ngsh.x10.mx, and I tried to connect to this adress from my MYSQL Worbench (5.2). I just changes the adress from localhost to the adress, but it just gave me "error: 2" any help, thank you in advance.
    For security reasons the Remote MySQL is disabled on x10 servers. You can't connect to MySQL from outside.

    The scripts on your account can access the MySQL using Hostname as localhost.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  3. #3
    keaysma29 is offline x10Hosting Member keaysma29 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Re: Mysql Connection

    S owhat you are saying, is that you cannot technically "host" anything, this means that just using localhost is the samething....

  4. #4
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: Mysql Connection

    Quote Originally Posted by keaysma29 View Post
    S owhat you are saying, is that you cannot technically "host" anything, this means that just using localhost is the samething....
    Can host anything valid(which follows TOS) but can only accessed locally by the scripts. That means you can't access the MySQL directly from outside. You can access the MySQL from inside(Files on your hosting account).
    Last edited by Gouri; 09-26-2011 at 02:38 AM.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  5. #5
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,998

    Re: Mysql Connection

    I should also point out that PHPMyAdmin is installed in cPanel to assist with the management of databases on the account; since PHPMyAdmin is running on the server itself, it'll still work for editing database info.


    TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!

  6. #6
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,152

    Re: Mysql Connection

    And there is nothing against the rules about providing a PHP-based web API to the database from your hosting account (provided that you have at least one web page that uses the same API, say as a set of AJAX calls). You would still be subject to the same resource restrictions as any ordinary website on your hosting plans, but translating a SQL query/response to and from JSON or a similar, minimal bit of structured text isn't terribly difficult. Binaries would have to be base64-encoded, of course, and you'd want to include some kind of type indication for things that look like numbers (text, floats or exact decimal representations, etc.). The resource cost can be very low, particularly if you use SPROCs -- but having an API with a restricted vocabulary is a whole lot safer than direct DB access in any case. If it's for a desktop app, you can go the whole SOAP route as well.

    Just remember that you need a corresponding web UI on your site to make it legitimate according to the terms and policies here. It's a good idea anyway, in case you need to access or manipulate data using a foreign machine.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  7. #7
    keaysma29 is offline x10Hosting Member keaysma29 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Question Re: Mysql Connection

    essellar, I am goin to say it, "what?"
    1. I clearly need to know more about this, I just dev games. This is the first time I have ever worked with mysql.
    2. My basic goal is to have a db that allows users to save and load coordinates for thier place on an online game, I have this working for localhost.

  8. #8
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,152

    Re: Mysql Connection

    If the online game is on your site, then you'd still use localhost -- it'll just be a different localhost (the server rather than your own machine). If the game is hosted elsewhere, you'd probably be breaking the ToS/AUP using x10Hosting just for the database.

    But to explain what I was saying: a web API is a service that you create. Instead of your users interacting directly with the database, they make a request to a PHP script, and that script talks to the database and returns the results, usually as some kind of structured text (XML or JavaScript Object Notation normally, but there are other less common structures as well) rather than as a web page. You can send the script something that looks an awful lot like a SQL query, but then your script pulls it apart and makes sure that everything it's asking for is something you allow. With raw access to the DB, you are allowing users to drop or alter tables and databases, read and write rows they shouldn't have access to, and so on. If they have to go through your script to get there, you can enforce permissions without creating a new DB user for every application user. (And user-based permissions in MySQL aren't very granular.)

    SOAP is a web service protocol that rides on HTTP. If you were creating a .NET desktop application, it's the easiest way to talk to a remote computer -- you'd just include the web service using an include statement, almost as if you were using COM/OLE.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

Closed Thread

Similar Threads

  1. mysql connection
    By gopi.pulithara96 in forum Free Hosting
    Replies: 2
    Last Post: 04-06-2011, 04:30 AM
  2. Mysql no connection
    By olirav61 in forum Free Hosting
    Replies: 3
    Last Post: 03-11-2011, 04:17 AM
  3. mysql connection
    By ambilly30 in forum Free Hosting
    Replies: 2
    Last Post: 03-03-2011, 07:53 AM
  4. MySQL Connection
    By mylifestyle in forum Free Hosting
    Replies: 1
    Last Post: 07-28-2010, 10:36 AM
  5. Replies: 9
    Last Post: 01-10-2008, 03:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers