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 trial

Development Tools

MySQL Workbench and Xampp

Question: How do I install these two programs and make them work together? Am I supposed to have them both on my computer?

Background: I got really excited about the MySQL/PHP course this week and went crazy, downloading Xampp and MySQL Workbench as described in the videos. That's where I hit a wall. MySQL Workbench opened once, then kept throwing an error that made the program stop. I've uninstalled it now and am feeling a bit stupid. I had Xampp running but never did anything beyond that because I wanted to create a database.

I've never set up a localhost server before so I am at a loss for what even went wrong, let alone how to fix it.

Andrew doesn't mention Xampp in his database videos, and Randy doesn't mention MySQL Workbench -- all of which makes sense, because you wouldn't use a blender to build a shed. But how am I supposed to get both to play nicely with each other? Am I meant to have both of these programs running at the same time?

Signed, Frustrated Wanna-be Database Ninja

5 Answers

This is quite late seeing as this topic as over a year old, but since I see getting Workbench and XAMPP to operate together is a "bonus" task, I just searched for the topic and came to this forum question.

I did get both to work together, there was no procedure to follow really. In workbench, I stopped the server (I followed the advice in the video earlier to stop and start manually). Then I exited the program, and launched XAMPP and activated Apache and MYSQL checking that the port is 3306.

After launching Workbench, I choose localhost, open up the movie database script (or whatever), and create the tables all over again. So now it's ok and I prefer this route because I am using XAMPP along with Adobe Brackets instead of the Workspace here just out of personal preference. I will no longer be stopping and starting the server using Workbench, I will do that in XAMPP.

James Barnett
James Barnett
39,199 Points

They aren't designed to work together and you are unlikely to find a course where they combined. However there's more than one way to skin a cat and it's all part of the journey.

I did find this blog post looks like a promising starting point. The actual buttons you click will be different as the UI of your version of MySQL Workbench is most likely different from one the screenshots in were taken from.

Sorry to bump my own post, but I can't move on until I can get this working.

I uninstalled everything from my post above. Then I re-installed MySQL Workbench and Xampp without MySQL (you get the option) because I already have it from MySQL Workbench. This was to test the theory that two installed instances of MySQL was causing an issue.

Now MySQL Workbench works but Xampp doesn't even open.

I can't be the only person who wants to use MySQL on a localhost server. How are you doing it?

Thanks, James. At least now I know I'm not doing something wrong.

I ended up keeping MySQL Workbench and installing Apache and PHP manually. It took a few hours of frustration and configuration, but it's working. All part of the journey, as you say. :)

For anyone who wants to go the manual route, I used (this blog post)[http://www.1stwebdesigner.com/tutorials/how-to-setup-local-web-server-with-latest-apache-php-and-mysql-packages] as a guide. This (PHP instruction)[http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath] finally got my Windows PATH configured and working at 3 a.m. last night.

I'm not a systems person so this was a triumph. :-B

The only problem i ran into was the default password ( not sure what i was ). So i ran shell from XAMPP and gave it:

mysqladmin.exe -u root password secret

This changed my password to "secret" ( you can use whatever you want, of course ) and i could connect without any problems.