Setting Up and Using MySQL on OS-X 10.6 Server

Is there a tutorial on how to setup and use MySQL on OS-X 10.6 Server? I have been trying to setup and enable a database using MySQL for several days, and just can’t seem to get this to work.

Mini Server, MacBook Pro 17 inch, iMac 20 inch, Mac OS X (10.6.3)

Posted on Apr 15, 2010 7:56 AM

Reply
4 replies

Apr 15, 2010 8:12 AM in response to Robert Nobis

Hi there

MySQL is pretty much setup and enabled by default. Just start/add the service (Server Admin). Then you can use a tool such as Sequel Pro (google it) to add, edit, delete databases.

Connect (with Sequel Pro) using IP address 127.0.0.1, username: root password: root or whatever you made it (settings) and leave the database field blank.

Does this help?

Message was edited by: Ray7905

Message was edited by: Ray7905

May 3, 2010 11:51 PM in response to Robert Nobis

I'm trying to do the same thing. I enabled MySQL via Server Admin (Add Service). I then turned on MySQL, performed the recommended post install security update (/usr/bin/mysql secureinstallation).

I cannot connect to MySQL in Sequel Pro using a standard or SSH connection. However, I did connect using the socket.

Username: root
Password: (whatever you set it to be)
Socket: /var/mysql/mysql.sock (I found this in the MySQL Service Log "View" in the Logs tab of the MySQL settings in Server Admin).

I hope that helps. I'd like to know how to connect via a standard connection if anyone knows how...

May 4, 2010 6:18 AM in response to Robert Nobis

See [this posting|http://labs.hoffmanlabs.com/node/1396] and [this posting|http://labs.hoffmanlabs.com/node/376]; how I got php and MySQL going for one of the content management systems I work with, and how the Sequel Pro connections are authorized.

The first posting was from an earlier 10.6 version; I've not rolled 10.6.3 into production as yet. The second posting was from 10.5 server but AFAIK the authorization sequence for Sequel Pro has not changed from the days of CocoaMySQL connections.

I'm not aware of a Mac OS X Server Tutorial here; once you get MySQL launched and going and once you get any php 5.3 issues sorted out with whatever php code you're running (and if you're running php), then MySQL is generally managed and maintained and operated as described over at the MySQL web site.

May 5, 2010 11:32 PM in response to MrHoffman

Thank MrHoffman. I had already come across some of your pages, but not those! They are very helpful, thank you.

I'm new to OS X server and at first I was disappointed it couldn't be set up like how I was used to in OS X, but the knowledge is slowly unraveling for me. I found I needed to do 2 things:

1) Select the "Allow network connections" checkbox in Server Admin >> MySQL. This fixed the error I was seeing in Sequel Pro that said error 'reading initial communication packet' error: 61. I did this with the firewall off.

2) Next, I enabled MySQL access on port 3306 as shown in the posting above.

I haven't tried connecting from php yet, but I expect it to work. Thanks!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Setting Up and Using MySQL on OS-X 10.6 Server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.