Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have successfully installed mysql on my mac, and now on the command-line I can type which mysql and the mac replies back the expected path.

I would like to get started with the tutorial here. But according to that tutorial, I need to some additional set up before starting that tutorial. The document refers me to the server administration chapter, but this doesn't show my how to perform the remaining setup... it's more like a reference, so I don't know where to get started.

Is there any good document online to show me how to start administering my mysql database so that I can work through the tutorial?

update: If it's imporant, typing mysql -u root at the command line replies this error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

In case anyone is interested, this is the best mysql tutorial that I've found on the web.

share|improve this question
up vote 2 down vote accepted

I am not a mac person, but the error means that mysql isn't running. Have you tried to start it?

Update: There is a document here that has simple instructions for installing mysql.

It said the command to start the server is sudo /Library/StartupItems/MySQLCOM/MySQLCOM start

I also don't suggest the tutorial on the mysql site, because it can be unclear at times. I am sure there are good one specifically for a mac.

Also, if you are running a web server with PHP, phpMyAdmin makes it easy to visually administer your database. I saw there is a mac version here:

share|improve this answer
Starting mysql... do tell. (you see I'm very new to all of this) – John Berryman Dec 11 '10 at 18:42
mysql is a program that runs in the background & connects to your database when programs or scripts try to access it. Let me look at the tutorial you are using & I will see if I can suggest anything. – BrNathan Dec 11 '10 at 18:44
Are you using Mac OS X? – BrNathan Dec 11 '10 at 18:47
yes I am using a Mac OS X – John Berryman Dec 11 '10 at 18:48
Good information, all. It turns out that I needed to change the owner and group (in the linux sense) of some of the mysql components, per this document (near the bottom): . Based on what you said, I'll work through the mysql tutorial long enough to see that things work, and then I'll try to find something better. – John Berryman Dec 11 '10 at 19:02

safe_mysqld & will start mysql from the directory where is installed. the first time you start it you will have to initialize the mysql tables - not sure if this applies to mac.

as an alternative I use MAMP which is the same as LAMP but for mac - has a widget so you can control servers etc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.