|Jan 31, 2012, 10:28 AM||#1|
MAMP, MySQL, Netbeans help- "safari cannot connect to localhost"
Very new to using MAMP and not too hot with running diagnostics or using terminal (though i know some basics).
My problem is i think in setting up MAMP, MySQL workbench and Netbeans to work together... the actual issue is when i click on 'run project' in Netbeans, it opens safari and says that it can't connect to localhost:8888. i am trying to run an .html page.
I ran 'sudo apachectl -t' through terminal as mentioned in another forum and it said 'syntax ok'. Not sure how relevant this is.
Using Mac OS X 10.6.8. I had some issues setting up a new server instance in MySQL workbench- I'm still not sure that my settings are right though the paths check out:
path URL/admin tool: /Applications/MySQLWorkbench.app
Path to start command: /Applications/MAMP/bin/startMysql.sh
Path to stop command: /Applications/MAMP/bin/stopMysql.sh
Oh, also thought it was weird that my basic MySQL server properties (netbeans>services>databases>properties) defines the port i'm using as 3306. Though my MAMP port as defined on the starter page that opens in my browser on opening MAMP is 8889. And Safari is telling me it cant connect to localhost:8888. Why are all these different and should they be the same? The new server instance that i created in MySQL workbench was created on 3306.
Well, thats all the info i can think to provide. Any advice appreciated or links to a good MAMP configuration tutorial perhaps (I have been following a WAMP config tutorial, but it is different. Some of the paths and file names are different to mine and even some of the steps are different. Can't find anything online that explains what i need to know)
Thank you, really appreciate any responses to be able to finally preview my site!
P.S. My apologies- this is a repost from the 'macbook pro' thread as i started the thread in the wrong place first time around, and couldn't simply move it.
|Feb 8, 2012, 04:16 AM||#2|
It is not really clear what your are trying to do, but as you are using MAMP I assume you are trying to program PHP in Netbeans, to run on MAMP's Apache Web server?
PHP does not need to be compiled, as it is executed (interpreted) on page request. So you do not need to 'run' a project as it is being interpreted whenever a page is being requested.
So you just need to code in Netbeans (or any other IDE or text editor), and just browse to localhost (I set my Apache port back to 80).
Note that MAMP indeed uses it's own ports, not to conflict with any other possible running instances. Also, privileged ports (below 1024) require root access, so setting Apache to port 80 would require you to enter your administrator password when you try to run MAMP. Note that you can easily change the ports configured in MAMP by just running the bundled MAMP application...
Also note that MAMP is only able to run one site, and MAMP Pro (which you have to buy) is able to run more. However, it is extremely easy to allow multiple sites (virtual hosts) by just editing the httpd.conf. I always develop in ~/Workspace and I have created a folder ~/Workspace/apache to hold my apache virtual host configuration files. Defining host names in /etc/hosts and creating their respective virtual host configurations allows for running multiple virtual hosts from within MAMP:
This allows me to update MAMP whenever I want, and I just have to append that one line to MAMP's httpd.conf to have my setup working again...
Last edited by 4np; Feb 8, 2012 at 04:26 AM.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Resetting MySQL password and Sudo issues.||fraser1980||OS X||5||Oct 3, 2012 12:46 PM|
|Why does Mac OS say 3 users are connected to my shares? I'm the only one connected?||alexreich||Mac OS X Server, Xserve, and Networking||7||Oct 2, 2011 02:16 PM|
|Resolved: cannot connect to home wifi with iphone 4 :/||daniel-shi||iPhone Tips, Help and Troubleshooting||8||Sep 26, 2011 02:23 PM|
|Cannot Update my apps - cannot connect to itunes||henneth||iPad Apps||3||Nov 8, 2010 11:32 AM|
|Macbook Pro connected wirelessly to Netgear DG834 but cannot connect to the Internet||atlanticza||Mac Basics and Help||3||Jul 25, 2009 02:47 PM|
All times are GMT -5. The time now is 02:15 AM.