Posts Tagged ‘mysql database’

Error Message – Could not connect to MySQL database

February 17, 2010

OMG I have just had THE most stressful 3 hours EVER!

Well maybe…

Anyway what has been happening is that I have been getting an error message everytime I try to open up MAMP.

“Error: Could not connect to MySQL Database”

This pops up in Firefox as Mamp opens. So basically I could still work on the website, but this error message came up when I tried to get to the MAMP start page. And I have been having a few problems with the website so I thought that fixing this might solve my problems (I hope so but still to see about this!)

So anyways…

I looked and looked and looked for an answer and found that many people do many different things.

My Solution –

So what I did may not help you as you may have a different problem, BUT…..

What I did in the end was that I went into /Applications/MAMP/bin/Mamp/index.php and I changed line 15, where it says ‘root’ ‘root’ – I changed these to my ‘username’ and then my ‘password’ (The ones that I chose when I first set up MAMP)

I next went into /Applications/MAMP/bin/phpMyAdmin/config.inc.php and changed lines 85 and 86 to my username and password.

Then I saved and closed these files and I quit MAMP and re-started and IT WORKED!!!  I am so so so so sooooo excited!!

Computers are so great sometimes. I think the fact that they often don’t do what I want them to makes it so much more satisfing when they eventually do. I feel like I have really conquered something HUGE!

Ah – so now onto my next problems….