Closed Thread
Results 1 to 3 of 3

Thread: connecting to database

  1. #1
    Daiphron is offline x10Hosting Member Daiphron is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    25

    connecting to database

    I am trying to connect to my database using a php script. The crucial line is

    $dbc = mysql_connect ('localhost', 'username', 'password')

    where 'username' is the username I specified for the database and 'password' is the password I specified for that username. I get the error message

    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in...

    what am I doing wrong? I don't think there is anything wrong with the database anymore. It shows up in my database list and phpMyAdmin works fine as well.

    Thanks

  2. #2
    Xemnas's Avatar
    Xemnas is offline x10 Elder Xemnas is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    812

    Re: connecting to database

    Corey hasn't started maintenance on Cossacks yet, so for the moment you'd still be using mysql.x10hosting.com. I wouldn't change it though, since the maintenance on Stoli will probably be finished in the next couple of days.

  3. #3
    Daiphron is offline x10Hosting Member Daiphron is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    25

    Re: connecting to database

    Fantastic! That worked! Thanks so much.

Closed Thread

Similar Threads

  1. How to create MySQL database and user
    By Jesse in forum Tutorials
    Replies: 11
    Last Post: 06-04-2008, 12:25 PM
  2. install drupal
    By abhi666 in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 02-18-2008, 08:05 AM
  3. PHP BB 2.0.16 Manual instalation
    By GFIV in forum Free Hosting
    Replies: 8
    Last Post: 09-14-2005, 12:40 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