We help IT Professionals succeed at work.
Get Started

running mysql on godaddy server - can't connect to my db

829 Views
Last Modified: 2013-12-13
MySQL and PHP are both running on my godaddy windows server. I've successfully installed the MySQL DB and I can run php on the server. HOWEVER when I try to connect a page to the MySQL db - no dice - this is what my connection file looks like:

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_mbb = "xxx.hostedresource.com";
$database_mbb = "xxxwebsitedb";
$username_mbb = "xxxwebsitedb";
$password_mbb = "xxxx";
$mbb = mysql_pconnect($hostname_mbb, $username_mbb, $password_mbb) or trigger_error(mysql_error(),E_USER_ERROR);
?>

and this is how i'm connecting:

<?php require_once('Connections/mbb.php'); ?>

now, i built this site on a linux server and have no problems with the connection or any other bugs -
Comment
Watch Question
Fixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE