If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > can't connect to localhost, why oh why?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-05, 15:49
iPhotoStuff iPhotoStuff is offline
Registered User
 
Join Date: Jan 2005
Posts: 2
Thumbs up 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 11:23.
Reply With Quote
  #2 (permalink)  
Old 01-10-05, 11:21
iPhotoStuff iPhotoStuff is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On