I strongly dislike GoDaddy, and do NOT recommend using their services. Due to GoDaddy’s excellent marketing, I’ve (unfortunately) had many clients who have already registered their domain names with the infamous GoDaddy. Please don’t fall into this trap! BOYCOTT GODADDY.
OK, now that I’m done with that…
My purpose is to help you connect your MySql database to a live site (not localhost).
Godaddy-linux uses different servers and “localhost” is replaced with “mysqlxx.secureserver.net”, where the xx is the sever number.
You need to gather your Database’s Name, User, Password, and Host.
To get your dbhost value from GoDaddy you will have to visit your control panel to view the connection strings for the database you’re connecting to…
1.) Get yourself to the MySql Database Information section. (you should have already set up a DB)
2.) Click on the pencil icon next to the DB’s name.
3.) The info you need is “Host Name: XXXX”
<?php
// db properties
$dbhost = ‘XXX’; //This value is difficult to find with GoDaddy.
$dbuser = ‘XXX’; //Database user name
$dbpass = ‘XXX’; //Database password
$dbname = ‘XXX’; //Database name
?>
Upload this file to your site.
Are you getting an error?
After I uploaded the correct connection info, I got this error:
• Client does not support authentication protocol requested by server; consider upgrading MySQL client
To fix this:
• Pop open your database manager from your hosting manager, and then open an SQL query window. In the SQL query window, enter the following:
SET PASSWORD = OLD_PASSWORD(‘MyPassword’);
And hopefully, that’ll resolve your problem! If it doesn’t you’re going to have to call Tech Support…and good luck with that b/c GoDaddy sucks!
If you liked this post, buy me a coffee. (Suggested: $2 a coffee or $5 for latte)
Filed under: Design, Tutorials, Tips & Tricks, Web Design & Dev on June 2nd, 2008 | No Comments »