Entries Tagged as 'MAMP'

Navicat Connetion with MAMP Pro

MAMP Pro has a lot of nice features. However, this means it changes things up a bit. How you make a connection with Navicat is one such example. So here is a quick helper post get Navicat up and running with MAMP PRo.

1) Add your information to the “Connection Properties” Pane as you normally would.

Navicat Pane -General

2) Click on the “Advanced” pane and check the box next to “Use socket for localhost connection.”

3) Then for the “Socket File Path” field type the following path.

/Applications/MAMP/tmp/mysql/mysql.sock

The “Advanced” Pane should now look like this:

Navicat Advanced Pane

Click “OK” and you should be all set.

Navicat Connection Sucessfull

I hope this helps. Please feel free to make comments.

Creating Virtual Hosts ON Your MAC for MAMP

Open up the terminal.
1)    Web-Two:~ webtwo$  cd /etc <–change directory to the etc directory

2)    Web-Two:etc webtwo$ sudo nano hosts <–super user do (does not stay logged in),  editor, file=hosts

3)    Password: *******  <– enter password

4)   Editor opens up. You will see something like this…

#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

5)  Type in the local IP followed by the name of the site you wish to make a virtual host for:
ie. 127.0.0.1 yoursite.you <– replace this with your name
You should do this for each site you wish to make a virtual host for , line by line.
Your /etc/hosts   file should now look more like this:
#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
127.0.0.1 yoursite.you

127.0.0.1 anothersite.you
127.0.0.1 yetanothersite.you

6)  Exit your editor, in this example I used, nano. Note: Be sure to SAVE the file.

7)  OK, now navigate to the file:    Applications/MAMP/conf/apache/httpd.conf  and open it in a text only editor ( like BBedit or Smultron or something )

8)  Scroll to the bottom of the httpd.conf file. For each site type in the following:

<VirtualHost *>
DocumentRoot “/Users/yourusername/Sites/site-folder-name”  <– replace with your own appropriate info
ServerName  localsite.you
<– replace with your own appropriate info
ServerAlias localsite.you <– replace with your own appropriate info
<Directory “/Applications/MAMP/htdocs”> <– do NOT change for MAMP
AllowOverride all  <– this allows the htacces file to work properly
</Directory>
</VirtualHost>

9) Save the Applications/MAMP/conf/apache/httpd.conf    file and RESTART your MAMP server.

Now, when you type in the  site   www.localsite.you  followed by your MAMP port (usually 8888) like this:

http://www.localsite.you:8888 your site will come up!

Hope this helps!

Viewing the Websites You Are Developing Locally on Your Computer Using MAMP

Normally, when using MAMP ( I am presently using the FREE version of MAMP) you view the site you are working on in a couple of ways.

Put your web site in the    /Applications/MAMP/htdocs/     folder and point your browser to   http://locahost:8888/

or (This is what I like to do for multiple site management)

Put your sites in appropriately named folders under the “Sites” folder.
Click on MAMP Preferences and select the “Apache” tab. Then click the “Select” button and browse to the “Sites” folder.

That way, you can easily get to any of the folders by typing in the URL http://localhost:8888/. You will be presented with a list of folders (as links). These folders are the sites you are developing under the Sites directory. Just click the folder (link) you wish to view and you’re there.

Hope this helps!

View Paul Leasure's profile on LinkedIn