Results 1 to 6 of 6
  1. #1
    Yup, Sure ... now let me check ... Cagles Mill's Avatar
    Join Date
    January 18th, 2005
    Location
    The Midwest
    Posts
    646
    Setting up a SQL local host?
    This will probably seem lke a pretty dumb question to some folks, but here goes anyway.

    I have set up my_sql databases in the past, but now I am trying to set one up through a host that has CPanel. CPanel wants me to declare a name for the database, a user name and a password. So far, so good. But, then it requires that I assign a "local host". The local host name would of course be a part of the PHP statement: $con = mysql_connect("localhost","user name","password");. However, I can't find any directions anywhere that even hints at what a "local host" should look like in order for it to work. Every other database I ever sat up clearly told me what the equivalent term would be.

    Any help on this would be appreciated.
    Rick M.
    I would rather have a bottle in front of me, than have a frontal lobotomy!
    Does your bubblegum lose its flavor on the bedpost overnight?

  2. #2
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    I just use "localhost". No need to change it.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  3. #3
    Yup, Sure ... now let me check ... Cagles Mill's Avatar
    Join Date
    January 18th, 2005
    Location
    The Midwest
    Posts
    646
    Thanks Scott.

    That's what I was wondering and when I tried it, it seemed to connect (at least it wasn't giving me any errors). However, I can't seem tp be able to modify the database table or select any information from it. After checking the code about a 100 times, the only thing I could think of is that I need to change the localhoast name to something else.

    Oh well, I'll keep playing with the code. I'll probably find eventually that the problem is something really obvious. It seems to be a law of programming that the longer it takes to solve a problem, the simpler the solution turns out to be.
    Rick M.
    I would rather have a bottle in front of me, than have a frontal lobotomy!
    Does your bubblegum lose its flavor on the bedpost overnight?

  4. #4
    Yup, Sure ... now let me check ... Cagles Mill's Avatar
    Join Date
    January 18th, 2005
    Location
    The Midwest
    Posts
    646
    OK, Problem solved. In CPanel once I sat up the database, user and password name, you then have to assign a user to the database. Since my user name was showing under "Current Users", I didn't realize I still wasn't added as a user and so had to add it under "Add Users To Your Databases:".

    Oh well, most of a day wasted, but at least now it works.
    Rick M.
    I would rather have a bottle in front of me, than have a frontal lobotomy!
    Does your bubblegum lose its flavor on the bedpost overnight?

  5. #5
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Quote Originally Posted by Cagles Mill
    OK, Problem solved. In CPanel once I sat up the database, user and password name, you then have to assign a user to the database. Since my user name was showing under "Current Users", I didn't realize I still wasn't added as a user and so had to add it under "Add Users To Your Databases:".

    Oh well, most of a day wasted, but at least now it works.
    Great, glad you were able to figure it out!

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  6. #6
    ABW Ambassador PatrickAllmond's Avatar
    Join Date
    September 20th, 2005
    Location
    OKC
    Posts
    1,219
    Good experience always comes from mistakes!
    ---
    This response was masterly crafted via the fingers of Patrick Allmond who believe you should StopDoingNothing starting today.
    ---
    Focus Consulting is where I roll | Follow @patrickallmond on Twitter
    Search Engine Marketing | Search Engine Optimization | Social Media | Online Video

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. To Host or Not To Host? ...that is the question.
    By maxwellgarner in forum Marketing Resources & Power Tools
    Replies: 4
    Last Post: August 1st, 2010, 01:40 AM
  2. Local Results Getting Top SERPS For Local Searches
    By Trust in forum Search Engine Optimization
    Replies: 3
    Last Post: February 12th, 2007, 11:22 PM
  3. Virtual Host > Dedicated Host
    By Tami in forum Domains & Hosting
    Replies: 7
    Last Post: March 21st, 2005, 09:27 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
  •