title: MAMP running extremely slow with external database connection
body: <p>I am dealing with really slow loading of pages. I used Chrome console's Network tab to get this information (but it is slow on all browsers).</p>
  
  <p>I have researched the issue heavily, but now I am completely stumped. I have tried <a href="https://stackoverflow.com/a/10041204/1893629"><strong>Blowski's answer</strong></a> to <em>MAMP: reloading pages is very slow</em> (editing my <code>hosts</code> file), but had no luck with getting the page to load faster.</p>
  
  <p>I am running OS X 10.8.5, CodeIgniter 2.1.3, and connecting to a remote MySQL database (which is on the same server as the live web server). Not sure if that has anything to do with the waiting being so long. Speed tests for loading the same page are below:</p>
  
  <p><strong>localhost</strong><br>
  Waiting time is 13.49 seconds</p>
  
  <p><img src="https://d.pr/i/iUe9+" alt="enter image description here"></p>
  
  <p><strong>Web Server</strong><br>
  Waiting time is 222 milliseconds</p>
  
  <p><img src="https://d.pr/i/NkIY+" alt="enter image description here"></p>
  
  <p>What can I do to fix this issue?</p>
  
  <p><strong>Update:</strong> I've narrowed down the issue to the MySQL database (which is located on a remote server, separate from where PHP (MAMP) is installed). Are there any settings I would need to change to fix this horrible load time? I am also connecting to the database using an IP address and not a domain name, so I don't believe it is a DNS issue with the server MySQL is installed on.</p>