Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChris Martinez
11,715 Pointsaccess denied
i keep getting this error:
Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2006] MySQL server has gone away' in C:\MAMP\htdocs\database.php:5 Stack trace: #0 C:\MAMP\htdocs\database.php(5): PDO->__construct('mysql:host=loca...', 'root', 'root') #1 {main} thrown in C:\MAMP\htdocs\database.php on line 5
ive tried leaving off the password, tried listing and not listing my port, and i dont understand half the jargon some of these answers.
1 Answer
Chris Martinez
11,715 PointsI figured this one out the next day. Amazing what a little rest will do for problem solving. I was not writing in the correct port number for mysql: i was using the number for apache!
Liam Linacre
Courses Plus Student 386 PointsLiam Linacre
Courses Plus Student 386 PointsThis isn't really a problem with your connection details.
From the MySQL reference:
Has MySQL definitely started properly? Has MySQL worked properly in the past for you?
I recently tried to get MAMP working on my windows machine and ended up going back to WAMP Server