image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old March 25th, 2007, 08:44 PM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
David B is on a distinguished road
MAMP user can't connect to Database

I installed MAMP on my MacBook Pro and finally got my virtual hosts and .htaccess files to work. However, I'm using the default Apache installation, rather than MAMP's Apache version (which could possibly be the problem).

Anyway, I can access my databases and manipulate tables with phpMyAdmin, yet I can't connect to my databases with Dreamweaver. I accidentally deleted the database "test," but I created a new one named Test2. I haven't created a password or username on anything. When I open Test2 and click Privileges, this is what I see:

Code:
User  	Host  	Type  	Privileges  	Grant 
root 	localhost 	global 	ALL PRIVILEGES 	Yes
root 	webeditions-computer.local 	global 	ALL PRIVILEGES 	Yes
This is what my database connection in Dreamweaver looks like:

Code:
$link = mysql_connect ("localhost" , "root" , "") or die(mysql_error());
mysql_select_db ("Test2", $link) or die(mysql_error());
But when I preview a page, I get this error message:

Code:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /Users/davidblomstrom/Sites/Geobop/a1/dbc.php on line 16
Access denied for user 'root'@'localhost' (using password: NO)
Root would have to be the correct username, wouldn't it? And wouldn't I just type in a pair of quotes - "" - where the password would be? What else could be the problem?

I had a hunch it might have something to do with my dual Apache installation, but I don't know how to troubleshoot that. Any tips?

Thanks.
Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 02:25 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.