0

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.

John Berryman
  • 347
  • 3
  • 12

2 Answers2

2

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.

http://doc.us.extensis.com/Installing-MySQL-on-OSX.pdf

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: http://www.macupdate.com/app/mac/8179/phpmyadmin.

BrNathan
  • 186
  • 1
  • 10
  • Starting mysql... do tell. (you see I'm very new to all of this) – John Berryman Dec 11 '10 at 18:42
  • 1
    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): http://developer.apple.com/internet/opensource/osdb.html . 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
  • I hope you get it working. – BrNathan Dec 11 '10 at 19:57
1

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.

silviud
  • 2,687
  • 2
  • 18
  • 19