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

Liban Shire
PLUS
Liban Shire
Courses Plus Student 4,147 Points

Installing MySQL, OS X

Andrew Chalkley mentions that in order to use The MySQL server, it requires a configuration file in a special folder on our hard drive called etc, and it isn't present on a default install. so we ended up making a A configuration file during the video just curious why this was necessary ?

he also mentions that We're going to use an example file with some default values. and used this code sudo cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf

Not quite sure why MySQL couldn't just have a predefined config file instead of the user having to do all the work? Is there some thing I'm not getting?,

Thanks.

Mike Bronner
Mike Bronner
16,395 Points

I know this is a bit off-topic, but something to consider in the future, once you have gone through the MySQL exercises:

Apple has dropped MySQL in favor of PostgreSQL, which is in many ways better. It uses much of the same SQL language, and installation is also relatively straight-forward.

I have moved all my development to PostgreSQL for this reason. OS/X server comes with PostgreSQL installed on port 5432 to manage its services, but I always install another instance on port 5433 for my own purposes, like APIs or web sites.

Sorry, didn't mean to derail the conversation, just some things to consider that I encountered on my way developing on Apple platforms. :)

1 Answer

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

I don't know why MySQL don't offer it but I suspect that when you're installing MySQL server on an OS X server you'd want to configure it to run and tweak it for that particular box. For development purposes the example file is enough. I guess the installation doesn't know or ask you what reason you're installing it. If you're hosting a database with a webhost this is already configured for you. If you install MySQL on a linux host directly yourself, you'll need to configure it but that's a little more involved.

There are third party installation suites out there like MAMP but I just wanted to go over a vanilla install.