Jump to content

Trouble Connecting to Database


gerhardtdesign

Recommended Posts

Never worked with GoDaddy before... Can't get my config script to connect to the database.  Here's my code (I'm sure all the login info is correct, except maybe the host name but I copied that from GoDaddy too...)

<?php
ob_start();
// MySQL connection settings
$db_host = "anakdesigns.db.2089823.hostedresource.com";
$db_user = "********";
$db_pass = "********";
$db_name = "********";
// Connect to the database
$con = mysql_connect($db_host, $db_user, $db_pass) or die("Cannot connect to DB");
mysql_select_db($db_name) or die("Error accessing DB");
?>

 

http://www.anakdesigns.com/dev

 

Link to comment
Share on other sites

Client does not support authentication protocol requested by server; consider upgrading MySQL client

 

Yep, I am fairly new to PHP so I am reading lots of books on it and getting better but that's one thing I'm sure I won't forget from here on out.  Thanks for the help.  I'll look up different methods of connecting.  No need for anymore sarcasm for me!

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.