Jump to content

Warning... Can't connect to local MySQL server through socket


ketchumdev

Recommended Posts

The settings in my connections files don’t mesh with what my online database requires. Godaddy, shared Linux.

This is the page:

http://bocce.tongie.me/add_user.php

 

Here is first of the two warnings my page generates:

Warning: mysql_connect() : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /home/content/86/7345486/html/bocce/connections/ketchumdevwrite.php on line 9

 

Here is one of my connection files:

 

<?php

# FileName="Connection_php_mysql.htm"

# Type="MYSQL"

# HTTP="true"

$hostname_ketchumdevwrite = "localhost";

$database_ketchumdevwrite = "bocce";

$username_ketchumdevwrite = "ketchumdevwrite";

$password_ketchumdevwrite = "****";

$ketchumdevwrite = mysql_pconnect($hostname_ketchumdevwrite, $username_ketchumdevwrite, $password_ketchumdevwrite) or trigger_error(mysql_error(),E_USER_ERROR);

?>

 

Line 9 is the last one, just before the close.

These are the settings for my local test server. I have no trouble accessing the online database using the Starfield Technologies interface, so this seems like it should be easy, but I am having no luck.

Where can I find the correct settings to connect to my online database?

Thanks to everyone.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.