Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 5 of 5
  1. #1
    Gold Lifetime Member
    TvDomain's Avatar
    Join Date
    Jul 2005
    Location
    USA
    Posts
    49
    DNF$
    326
    Bank
    0
    Total DNF$
    326
    Donate  

    cant connect to database mysql useing php

    i can use administrator mysql to connect to mysql server , it works fine, i use other sofware to connect and edit the database in mysql server , it works fine
    BUT whene i use my script to connect to database it dont want to work , it giveme error
    Could not connect to the database

    ---------------------------------------
    $link = mysql_connect('localhost', 'root', 'password');
    if (! $link)
    die('Unable to connect to the databasename database');
    mysql_select_db('databasename') or die('Could not open databasename database');

    -------------------------------------------------------
    mysql=4.1
    php=4
    i am close to lose it and format this thing
    any one help me out here ? befor i crash it please ?

  2. #2
    Social Media Evangelist
    dotcomgiant's Avatar
    Join Date
    Feb 2005
    Location
    Hyderabad
    Posts
    778
    Country

    India Follow dotcomgiant On Twitter Add dotcomgiant on Facebook
    DNF$
    4,588
    Bank
    0
    Total DNF$
    4,588
    Donate  

    Re: cant connect to database mysql useing php

    Try the following :
    Code:
    $link = mysql_connect('localhost', 'username', 'password');
    if (!$link) {
       die('Could not connect: ' . mysql_error());
    }
    LocaFY.in - The smartest way to find local information in India

  3. #3
    Gold Lifetime Member
    TvDomain's Avatar
    Join Date
    Jul 2005
    Location
    USA
    Posts
    49
    DNF$
    326
    Bank
    0
    Total DNF$
    326
    Donate  

    Re: cant connect to database mysql useing php

    Can't create TCP/IP socket (5)

    that is what it give

    Quote Originally Posted by TvDomain
    Can't create TCP/IP socket (5)

    that is what it give

    any one can help ?
    Last edited by TvDomain; 07-19-2005 at 12:22 PM. Reason: Automerged Doublepost

  4. #4
    Platinum Lifetime Member
    cyphix's Avatar
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    3,603
    DNF$
    1,774
    Bank
    0
    Total DNF$
    1,774
    Donate  

    Re: cant connect to database mysql useing php

    Ask your host why u are getting that error.
    538k Lyrics Database Available - Only $49 - Check Here

  5. #5
    Gold Lifetime Member
    TvDomain's Avatar
    Join Date
    Jul 2005
    Location
    USA
    Posts
    49
    DNF$
    326
    Bank
    0
    Total DNF$
    326
    Donate  

    Re: cant connect to database mysql useing php

    it is done guys , i fixed it , and it was mysql server problem with autentification , thank anyway

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
  •  

Domain name forum recommended by Domaining.com