Results 1 to 3 of 3

Thread: MySQL connection trouble...

  1. #1
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Question MySQL connection trouble...

    Ok... so I've looked at the tutorial at php-mysql-tutorials.com and I got the code that looked like this:
    PHP Code:
    <?php

    $dbhost 
    'localhost';

    $dbuser 'username';

    $dbpass 'password';



    $conn mysql_connect($dbhost$dbuser$dbpass) or die                      ('Error connecting to mysql');



    $dbname 'username_database';

    mysql_select_db($dbname);

    ?>
    One problem... I've tried this and I got a bunch of error messages like this:
    I have replaced the inital values *I just won't give them unless you guys give the ok...*
    Code:
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'username_admin'@'66.152.166.189' (using password: YES) in D:\hshome\markmonz\pureadd.com\construction\connect.php on line 11
    Error connecting to mysql
    I don't know how to get it so I can just connect and insert data... I haven't tried the insertion code yet because I have a feeling that If I can't connect I can't insert...
    I have already done localhost and a number of things... I am using the hosting service www.Gisol.com *I CAN'T SWITCH!* If someone could tell me what how to find the information... the knowledge base at Gisol doesn't tell about MySQL connections very well...

    Thanks to anyone who helps with this!

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    You need to ask your host for the username/password/database.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    K thanks I got it working now! WOOT I'M PYCHED! I ALWAYS WANTED TO MAKE A USER DATABASE! Just for fun lol... just for kicks, ok, maybe you all think I'm pycho now or crazy, maybe, just a complete nerd... ha ha... whatever...

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
  •