Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Question GoDaddy MySQL Stuff

    Hey,

    I have just finished making a large-scale project for a client of mine and when I went to move it over to his servers I got a little confused. He uses GoDaddy and their control panel is completely different than what I'm used to (cPanel 11)... so I need some help :P

    I have successfully transfered the database over but now I can't seem to connect to it... oddly enough? Do I have to use some different kind of php connection script to connect to their databases or something? Here's what I currently use:

    PHP Code:
    $dbhost "h50mysql9.secureserver.net";
    $dbuser "user_here";
    $dbpass "password_here";
    $dbname "name_here";
    $db mysql_pconnect($dbhost,$dbuser,$dbpass); 
    mysql_select_db("$dbname",$db); 
    Is that okay? I'm not sure... a quick reply would be greatly appreciated! Thanks!
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I don't know if you can use pconnect on godaddy. I use mysql_connect and I'm able to connect to my database. Open the database manager to be sure you are selecting the right database. echo out mysql_error() to see if something is wrong.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,072
    Thanks
    2
    Thanked 320 Times in 312 Posts
    Someone correct me if I am wrong, but godaddy runs PHP as a CGI wrapper.

    If the above statement is true, then pconnect won't work as expected. I believe a mysql_pconnect would behave exactly like a mysql_connect under these conditions.

    Adding the error reporting that _Aerospace_Eng_ suggested will help pinpoint if this is the case. Also, check the web server log file for errors and/or put the following two lines in after your first opening <?php tag -
    PHP Code:
    ini_set ("display_errors""1");
    error_reporting(E_ALL); 
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    Just to probably state the obvious (you never know) did you change the username and password in your script. When you transfered the databases its probable that you didnt also transfer the users and permissions.

  • #5
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by NancyJ View Post
    Just to probably state the obvious (you never know) did you change the username and password in your script. When you transfered the databases its probable that you didnt also transfer the users and permissions.
    Lol - yes I did infact change the username/password/db name when I switched it, that was the first thing I checked.

    As for the mysql_error reporting thanks! I will try that tonight and see what I get +rep both of you!
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #6
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Okay... tried echoing the error while using mysql_connect instead of pconnect and got this message:

    Client does not support authentication protocol requested by server; consider upgrading MySQL client
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Try this
    PHP Code:
    $dbhost "h50mysql9.secureserver.net";
    $dbuser "user_here";
    $dbpass "password_here";
    $dbname "name_here";
    $db mysql_connect($dbhost,$dbuser,$dbpassword) or die(mysql_error());
    mysql_select_db($dbname) or die(mysql_error()); 
    Last edited by _Aerospace_Eng_; 05-25-2007 at 10:39 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Still getting the error:

    Client does not support authentication protocol requested by server; consider upgrading MySQL client
    Wait! and now its changed... sometimes I get this:

    Can't connect to MySQL server on 'localhost' (10061)
    But thats only when I use this code:

    PHP Code:
    $dbhost "h50mysql9.secureserver.net";
    $dbuser "user";
    $dbpass "pass";
    $dbname "name";
    $db mysql_connect($dbhost,$dbuser,$dbpass);
    mysql_select_db($dbname);
    echo 
    mysql_error(); 
    Heres the page:
    http://soulandbluesreport.com/new/index.php
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Just tried your original code on my godaddy account and was able to connect to the database just fine even using pconnect.

    I think you need to contact godaddy.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Okay - will do Thanks for the help!
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #11
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    The "Can't connect to MySQL server on 'localhost' (10061)" is because you check the error after the mysql_select_db() call, which attempts to connect with it's default settings (found in php.ini).
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #12
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts
    I finally figured it out!

    After emailing GoDaddy Support they told me that Windows Hosting does not support PHP! I felt so stupid! But anyways... now I have to try and get my client to switch his hosting to Linux :S

    Thanks for all the help!!
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #13
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I thought their Windows plans had support for php and asp, maybe thats just for some of them.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #14
    Regular Coder Troy297's Avatar
    Join Date
    Oct 2006
    Location
    Earth
    Posts
    314
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    I thought their Windows plans had support for php and asp, maybe thats just for some of them.
    Close but not quite.... their Windows Hosting Plans only have ASP (with Access, MySql, and SQL Databases). If you want PHP, CGI, MySQL, etc. you need their Linux Hosting.

    Who knew eh?
    Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say.
    Radio DJ Panel v3 - It's Here!

  • #15
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You're gong to want to switch hosts once you discover Godaddy is running MySQL 4.0 and has no plans to upgrade.

    Our support staff has responded to your request, details of which are described below:

    Discussion Notes
    Support Staff Response
    Dear Randy Whitaker,

    Thank you for your email. We apologize for the inconvenience, but currently we have no schedule for upgrading MySQL. Please send this suggestion to suggestions@godaddy.com as many of our products and features have either been created or improved by customer suggestions.

    Please let us know if we can help you in any other way.

    Sincerely,

    Aris Q.
    Customer Care Specialist
    Customer Inquiry
    Browser Info : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

    What are your plans for upgrading MySQL to 4.1 or (preferrably) 5.0? Version 4.0 has many drawbacks I am running into; namely, subselects do not work. Do you have a schedule for upgrades?


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •