Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    2

    Thumbs up Unanswered: can't connect to localhost, why oh why? >>ANSWERED<<

    hi folks,

    I have been pulling my hair out over this all day and have to ask for help. I have set up on my local machine apache and mySQL. I'm no developer, so I have just been using Navicat to manage mySQL. I have not problems managing my local DB. I enter the following in the prompt window to access it:
    Code:
    host: localhost
    User name: root
    Password: myPassword
    No, problem. The DB "myDB" opens up, I see all my content etc.

    Now, I have a simple include file that I use in php that works PERFECTLY online:
    Code:
     <?php
     $username="root";
     $password="myPassword";
     $database="myDB";
     $location="localhost";
    
     mysql_connect($location,$username,$password);
     mysql_select_db($database);
    ?>
    But it does NOT connect locally. I have checked permissions inside mySQl, and as far as I can tell I have opened up every permission possible for every user. Can anyone please help me figure out why the exact same entries from my functional php file is not connecting to my localhost when that exact same file works elsewhere? Please, I am about to exp-p-p-lode!!!

    -i
    Last edited by iPhotoStuff; 01-10-05 at 12:23.

  2. #2
    Join Date
    Jan 2005
    Posts
    2
    server problem was:
    Code:
    Client does not support authentication protocol requested by server; consider upgrading MySQL client
    solution was:
    Code:
    SET PASSWORD FOR root@localhost = OLD_PASSWORD('newpwd');
    all fixed. Tons'o'joy!

    -i

Posting Permissions

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