+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: noob sql question

  1. #1
    matzomeal is offline x10Hosting Member matzomeal is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    4

    noob sql question

    I want to connect to my SQL database, but I'm not sure what to use as the host name. Is it localhost like I've seen in a bunch of tutorials? The name of the database is matzo_friendbase. Is the host matzomeal.x10hosting.com? I'm just a little confused...

  2. #2
    fguy64's Avatar
    fguy64 is offline x10 Sophmore fguy64 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    218

    Re: noob sql question

    localhost worked for me

  3. #3
    gomarc's Avatar
    gomarc is offline x10 Elder gomarc is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    USA
    Posts
    511

    Re: noob sql question

    Quote Originally Posted by fguy64 View Post
    localhost worked for me
    Yes, your host name is indeed “localhost”.

    Have you created a user/password for this database?
    If not, go back to your CPanel > MySQL Databases and use the “Add New User” give the proper permissions and then do the “Add User To Database” step.

    Then you’ll be ready to go.

  4. #4
    matzomeal is offline x10Hosting Member matzomeal is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    4

    Re: noob sql question

    thanks a lot

  5. #5
    fguy64's Avatar
    fguy64 is offline x10 Sophmore fguy64 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    218

    Re: noob sql question

    yeah, thanks gomarc.

    How do you distinguish between application server and database (file) server? I'm thinking "localhost" probably denotes the application server, and probably the actual location of the databases is something only the application server needs to know. Is this a correct way of looking at things?

    regards.

  6. #6
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: noob sql question

    "localhost" is the local computer, whichever computer a program happens to be running on. As a network address, it resolves to 127.0.0.1, the address for the loopback device, in IPv4. A loopback device is a virtual network device where all traffic is routed back to itself. It's like a phone that can only call itself.

  7. #7
    fguy64's Avatar
    fguy64 is offline x10 Sophmore fguy64 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    218

    Re: noob sql question

    Ha ha there's no place like 127.0.0.1. funneee. People, notice the redirect on 127.0.0.1 in the previous post.

    Anyways this would imply that on X10 the mysql_connect statement makes a connection to the same machine the php server lives on.

    Still wondering about differences between application server and file server in the MySQL context, but there's no hurry for that.

    Thanks.

    Quote Originally Posted by misson View Post
    "localhost" is the local computer, whichever computer a program happens to be running on. As a network address, it resolves to 127.0.0.1, the address for the loopback device, in IPv4. A loopback device is a virtual network device where all traffic is routed back to itself. It's like a phone that can only call itself.

  8. #8
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: noob sql question

    Quote Originally Posted by fguy64 View Post
    Anyways this would imply that on X10 the mysql_connect statement makes a connection to the same machine the php server lives on.

    Still wondering about differences between application server and file server in the MySQL context, but there's no hurry for that.
    I think your question about servers will confuse most people on this site, rather than help them. This is because people typically refer to servers as the actual machine hosting the interaction w/ the client; to simplify: the hardware.

    What you are questioning is in regards to virtual and/or application servers. These can reside on one or multiple machines, because it is software driven.

    If you want to know more about the partitioning and tablespace management of MySQL or PostgreSQL, you will need to ask an admin by opening the ticket. My guess is that you still will not get a response, unless you're a paid member. In which case, if it truely affects your operations, then you would not be paying for hosting, you'd run your own dedicated server.

    My guess, though, is that the services x10 provides is all on the same hard drive. This seems to be because when one goes offline (like Lotus), it doesn't effect any of the others.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  9. #9
    OdieusG is offline x10Hosting Member OdieusG is an unknown quantity at this point
    Join Date
    Jan 2009
    Location
    Bangor, Maine
    Posts
    50

    Re: noob sql question

    Quote Originally Posted by vol7ron View Post
    I think your question about servers will confuse most people on this site, rather than help them. This is because people typically refer to servers as the actual machine hosting the interaction w/ the client; to simplify: the hardware.
    Exactly....
    What you are questioning is in regards to virtual and/or application servers. These can reside on one or multiple machines, because it is software driven.
    By default, yes. SQL servers run on (usually) port 3306. HTTP servers (where your HTML pages are served) are port 80....
    If you want to know more about the partitioning and tablespace management of MySQL or PostgreSQL, you will need to ask an admin by opening the ticket. My guess is that you still will not get a response, unless you're a paid member. In which case, if it truely affects your operations, then you would not be paying for hosting, you'd run your own dedicated server.
    Paid hosting is the best, and on X10, affordable as h***. I have the $7.95 a month package and is well worth the money a month.
    My guess, though, is that the services x10 provides is all on the same hard drive. This seems to be because when one goes offline (like Lotus), it doesn't effect any of the others.
    Correct (not the hard drive thing...dunno about that)....that's why there are so many servers. The paid servers have less downtime since some people can't dish out money at all times for a webspace. In addition, the free servers are beaten to a pulp (either intentionally or not) by people that run scripts and it causes server overload and general messup on them. They can be pointed to multiple locations.....could be one right next door to you and you wouldn't know it

    Hope this clarifies a bit.....no I'm not an admin here, I just know technical knowledge about this stuff
    Last edited by OdieusG; 05-26-2009 at 09:08 AM.

  10. #10
    fguy64's Avatar
    fguy64 is offline x10 Sophmore fguy64 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    218

    Re: noob sql question

    duly noted vol7ron and OdeusG, thanks.

    It doesn't really affect how we do things, I was just curious. For my own interest, your explanations seem to imply that in the mysql_connect statement, localhost refers to a physical machine, and by default the mySQL client looks to a specific port on that server machine that the server application listens to, as there may be other applications listening on different ports on that server.

    Sorry if I'm long winded. Thanks again.

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Just got one little question about remote SQL.
    By shuggee in forum Free Hosting
    Replies: 3
    Last Post: 10-01-2008, 04:25 PM
  2. Old question - new spin - SQL Host Name?
    By holliquin in forum Free Hosting
    Replies: 5
    Last Post: 11-21-2007, 11:41 PM
  3. SQL Question
    By DizzyTechnology in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 01-16-2007, 07:56 PM
  4. question about SQL
    By alvaroag in forum Free Hosting
    Replies: 3
    Last Post: 09-08-2006, 08:06 PM
  5. A question regarding SQL
    By lambada in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 08-01-2006, 11:38 AM

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