Follow Fantora on Twitter
Fantora Word of Classified Ads and Community Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

godaddy mysql issue

Options
Ayaz
Posted: Thursday, March 27, 2008 6:54:11 AM
Rank: Newbie
Groups: Member

Joined: 1/31/2008
Posts: 2
Points: 6
Location: India

godaddy mysql issue

hi there

i'm trying to connect to a godaddy mysql with a third party script as follows

Code:


function Db($db_host="mysqlname", $db_user="User", $db_password = "Password", $db_name = "Name", $db_pconnect = 0) {
    $connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
    if (!$this->connection = $connect_handle($db_host, $db_user, $db_password)) {
      $this->error("Could not connect to the database server ($db_host, $db_user).", 1);
    }



But it is giving me the knockback with error

Code:


Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/s/h/a/name/html/includes/db_mysql.php on line 39



An unexpected error occured. Please try again later.

Can anyone help?
sachin
Posted: Thursday, March 27, 2008 6:55:45 AM
Rank: Advanced Member
Groups: Member

Joined: 3/3/2008
Posts: 83
Points: 249
Location: India

godaddy mysql issue

What is the mysqlname set to? Godaddy is the exception to use "localhost". You have to go into their control panel under databases >mysql>Click the edit button. The hostname will be listed 2nd:

Host Name: p14mysql532.secureserver.net

And you have to check it per database, even if they are the same acct, godaddy will put them on different mysql servers.
Reply With Quote
Ayaz
Posted: Thursday, March 27, 2008 6:57:19 AM
Rank: Newbie
Groups: Member

Joined: 1/31/2008
Posts: 2
Points: 6
Location: India

godaddy mysql issue

he name is the same as you listed - I knew to remove localhost. I just replaced it with name cos I didn't know if it was account specific or generic
sachin
Posted: Thursday, March 27, 2008 6:58:13 AM
Rank: Advanced Member
Groups: Member

Joined: 3/3/2008
Posts: 83
Points: 249
Location: India

godaddy mysql issue

Most webhosts you just use localhost and it works. Godaddy's just a pain about it. Getting the hostname from the ctrl panel should fix your problem though.
Users browsing this topic
Guest

 Related
PHP and seo
Boonex Dolphin PHP script is SCAM!!!
Problem in fetching rows from mysql in php?
remommendations for PHP math CAPTCHA script please
avoid php pages getting hacked
sending email with php
Powerful user administration application
please suggest
updating in MySQL
problem with .htaccess
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Fantora Blog | Discount Shop UK | Discount Shop USA | Discount Shop Canada | Discount Boutique France | Discount Shop Deutschland | Discount Shop Italia | Descuento Shop España

Free Classified ads, Webmaster Forum & Technology Reviews | Fantora Free Classified Ads | Buy & Sell Electronics, Mobile phones & Accessories | fantora Forums Community | Buy & Sell DVD, Games and Consols | Free eBooks & Softwares | SEO & Affiliate Marketing Discussion | Programming Language Forum (.NET, ASP, PHP, SQL) | Free Classified Ads | General Stuff (Movies, Chat, Comics) | Free Online English Movies & Reviews | Free Online Hindi Movies & Reviews | Australia & New Zealand Immigration Forum | Europe immigration forum | Canada Immigration Forum | Ireland Immigration Forum | US Immigration Forum | United Kingdom Immigration Forum

Main Forum RSS : RSS

Powered by: YAF.NET
Copyright © AI Logica All rights reserved.
This page was generated in 0.389 seconds.