Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jamescw4406

macrumors newbie
Original poster
Oct 25, 2006
2
0
SE Arizona
What I want to do is set up a MySQL server on my Intel iMac and create and manage databases on the same machine using a GUI front end, such as Cocoa. I downloaded and the installed the latest MySQL and PHP, neither shows up under applications. I can start or stop the MySQL server from the command shell, but I can't link to the server, in fact can't do anything else in MySQL. I'm not quite ready for web development. How do I remove PHP and configure MySQL to work locally, set passwords, figure out how to link to the local host, etc.

When I try to connect as root with no password, as instructed in the README file that came with the installation software, I get the following error:
MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Any advice would be greatly appreciated.
 

nightelf

macrumors 6502
Mar 25, 2003
272
1
If you got the MySQL installer from MySQL.com, you will find a System Preferences item (MySQL.prefPane) in the .dmg. Just drag this to your "PreferencesPanes" in the main Library folder. This will let you turn on and off the server.

MySQL also have a package that will turn on the server on restart, this is also found in the .dmg.

You can download some administrative apps for MySQL at http://dev.mysql.com/downloads/gui-tools/5.0.html. You can create users, set passwords, view logs, backup dbs, etc with these apps.

To fix the socket problem you need to modify the php.ini, and tell PHP to check the socket in the right place, not the old one.

http://docs.info.apple.com/article.html?artnum=302977
 

xoreu

macrumors member
Nov 12, 2006
41
0
If this is for testing and/or development, I'd recommend you try xampp. What it is is Apache, MySQL, and PHP wrapped together in a basic package. It also includes phpmyadmin, which is a great tool for managing MySQL databases. Best of all, there's almost no setup and configuration required.

Personally, I used it a lot for development on Windows, so I can't vouch for the Mac version, but I would guess it is as easy and helpful.

However, if you're planning to be using the MySQL databases for hosting a site (or something else that will give the public access to them), you probably shouldn't use xampp, as it isn't very secure.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.