# Using mamp/ local server

**URL:** <https://forum.kirupa.com/t/using-mamp-local-server/304700>\
**Category:** Uncategorized\
**Created:** [February 12, 2010, 3:08am UTC](https://forum.kirupa.com/t/using-mamp-local-server/304700 "2010-02-12T03:08:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geestring](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@geestring](https://forum.kirupa.com/u/geestring)\
**Post date:** [February 12, 2010, 3:08am UTC](https://forum.kirupa.com/t/using-mamp-local-server/304700/1 "2010-02-12T03:08:48Z")

</div>

\<?php //this file contains information to connect to database

DEFINE(‘DB\_USER’, ‘root’);  
DEFINE(‘DB\_PASSWORD’, ‘root’);  
DEFINE(‘DB\_HOST’, ‘localhost’);  
DEFINE(‘DB\_NAME’, ‘helpDesk’);

$dbc = @mysqli\_connect(DB\_USER, DB\_PASSWORD, DB\_HOST, DB\_NAME) OR die ('could not connect to the database: ’ . mysqli\_connect\_error());

mysqli\_query($dbc, ‘SET NAMES utf8’);

?\>

I get this “could not connect to the database: php\_network\_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known”

Is this wrong?
