Closed Thread
Results 1 to 2 of 2

Thread: unable to connect to mysql database,

  1. #1
    chrisjohn.24552 is offline x10Hosting Member chrisjohn.24552 is an unknown quantity at this point
    Join Date
    Jul 2011
    Posts
    1

    unable to connect to mysql database,

    i am unable to connect to my sql data base with following values,
    help me
    my error is unable to connect.

    server "boru"

    $username = "********";
    $password = "******";
    $host = "localhost:2083";
    $link = mysql_connect($host, $username, $password);
    if ($link) {
    die('Could not connect: ' . mysql_error());
    }

  2. #2
    vv.bbcc19's Avatar
    vv.bbcc19 is offline Community Advocate vv.bbcc19 is just really nice
    Join Date
    Jun 2010
    Location
    India
    Posts
    1,505

    Re: unable to connect to mysql database,

    Hi,
    Can you please check the following:
    PHP Code:
    <?php
    $con 
    mysql_connect("localhost","sql-username","sql-password");
    if (!
    $con)
      {
      die(
    'Could not connect: ' mysql_error());
      }

    // some code
    ?>
    This works if everything else is correct...i.e, username and password.
    Try and revert back if you have a problem
    BCV | Community Support Representative
    █ x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

Closed Thread

Similar Threads

  1. Replies: 2
    Last Post: 12-01-2010, 09:01 PM
  2. Replies: 2
    Last Post: 07-09-2010, 09:39 AM
  3. Replies: 3
    Last Post: 05-22-2010, 07:04 AM
  4. Replies: 3
    Last Post: 02-08-2010, 04:24 PM

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