try another color scheme:


Go Back   TECH6.0 > Get Techie > Programming > PHP/MySQL


connect to my db

This is a discussion on connect to my db within the PHP/MySQL section, part of the Programming category; I am in the process of moving my entire vbulliten site to a different server. So far the forums are ...

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 16-01-2009, 07:22 AM
No Avatar

Techie
 
Join Date: Aug 2008
Location: United States
Posts: 54
MisawaPlayer is on a distinguished road
Send a message via Yahoo to MisawaPlayer
Default connect to my db

I am in the process of moving my entire vbulliten site to a different server. So far the forums are working fine. The modules that I have generated, utilizing data read and manipulated from the DB are not though. I can not connect to my db.

This works on the old server.
PHP Code:
$mysqli mysqli_connect("localhost",$username$password$dbname); 
I have used "echo" to show me that the username, password, and dbname variables are set correctly.

On the new server though, I get this error:

Code:
mysqli_connect() [function.mysqli-connect]: (HY000/2002): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
What does this mean? Does anyone have ideas why this isn't working? What I can do to find out? or change?

Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 16-01-2009, 01:28 PM
No Avatar

Techie
 
Join Date: Aug 2008
Location: United States
Posts: 54
MisawaPlayer is on a distinguished road
Send a message via Yahoo to MisawaPlayer
Default

Thank you to anyone who read this and considered an answer. I figured it out. The "localhost" was set up differently on the new site and as such didn't work.
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes




All times are GMT +5.5. The time now is 06:56 PM.

Contact Us - Tech6.com - Link to Us - Advertise - Submit Site - Privacy Statement - TOS - Top