etc/my.cnf file dosen’t exist on Mac OS

Are you getting the following error while trying to connect to the MySql server admin.


Installing the MySQL on the Mac OS X is just pretty easy to do but OS X dosen’t create the my.cnf in the /etc directory. But what it does to created some supportive files at /usr/local/mysql/support-files directory. In order to fix this, just copy the my-huge.cnf into the /etc directory.

open the terminal and browse to the following location

cd /usr/local/mysql/support-files

then, run the following command

sudo cp my-huge.cnf /etc/my.cnf

This should created a my.cnf file at /etc directory.



Setting up Apache on Mac Lion 10.8

The new Mac version 10.8 (release July 2012) is no longer support the GUI for setting up the apache from Web Sharing in ‘System Preferences’. So this post will shows how to setup the Apache. However, Apache is already included as a part of OS. Open the terminal and you can run the following command to start/stop or restart the apache service. Open the terminal and run the following command as required.

  • sudo apachectl start
  • sudo apachectl stop
  • sudo apachectl restart

Simple!!! so the problem is to just setup the permission. For this you need to create a user.conf file in the /etc/apache2/users so lets create a user file Go to terminal again and run the following command

  • cd /etc/apache2/users

You can change myname with your name

  • sudo pico myname.conf

Use the folloing text to create myname.conf file <directory “=”” users=”” myname=”” sites=””> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all once create the the then one last step to create a ‘Sites’ folder at user (i.e myname) folder restart the apache server and all should be good!