ThyElite Forums

ThyElite Forums (http://www.thyelite.com/forum/index.php)
-   General Talk (http://www.thyelite.com/forum/forumdisplay.php?f=14)
-   -   Need a genius. (http://www.thyelite.com/forum/showthread.php?t=2035)

MYMOMMAGOTBEEF 08-08-2006 09:58 PM

Need a genius.
 
Ok my problem is that I have problems connection to my mysql database. :violent1: :violent1: I need some who knows some php coding and some about mysql databases. Everytime I visit my site http://halokings.info I get this error
PHP Code:

Warningmysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/halokings.info/config.php on line 3

Warning: mysql_select_db(): Can'
t connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2in /home/www/halokings.info/config.php on line 4

Warning
mysql_select_db(): A link to the server could not be established in /home/www/halokings.info/config.php on line 4
Can
't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 

Can anybody help?

AppleGeek 08-08-2006 10:56 PM

Yeah, um that isn't going to help us fix your problem. It only tells us that the problem relates to your database connection info being incorrect.

I'll help but you have to contact me on MSN or AIM, 'cuz I'm not getting up to do anything.

LittleDevil2128 08-08-2006 11:05 PM

As Apple said, there is nothing we can do without the PHP source.

MYMOMMAGOTBEEF 08-09-2006 01:05 AM

Here's the code that im supposed to use
PHP Code:

<?
   ob_start
(); // allows you to use cookies
   
$conn mysql_connect("localhost","DATABASE USERNAME","DATABASE PASSWORD");
   
mysql_select_db(DATABASE NAME) or die(mysql_error());
   
//fill in the above lines where there are capital letters.
   
$logged MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'");
   
$logged mysql_fetch_array($logged);
   
//the above lines get the user's information from the database.
?>

And then I edited it to
PHP Code:

<?
   ob_start
(); // allows you to use cookies
   
$conn mysql_connect("localhost","davsou10_db","MyPASS");
   
mysql_select_db(davsou10_db) or die(mysql_error());
   
//fill in the above lines where there are capital letters.
   
$logged MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'");
   
$logged mysql_fetch_array($logged);
   
//the above lines get the user's information from the database.
?>

and I saved it as config.php as the tutorial told me.

PyR0 08-09-2006 01:44 AM

Have you actually created the Database in your ACP yet?

MYMOMMAGOTBEEF 08-09-2006 01:38 PM

yea i named it db but when i log in to phpmyadmin it says my db username is davsou10_db

THUNDER_06 08-11-2006 04:42 AM

go to instatantsig.com i know its not much your sig will look crap (like mine) and i dont have a clue how to use photobucket and photo shop lol


All times are GMT -6. The time now is 05:39 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.