# Error code#2002

**URL:** https://forum.mautic.org/t/error-code-2002/5906
**Category:** Product Support
**Created:** [February 24, 2016, 7:38pm UTC](https://forum.mautic.org/t/error-code-2002/5906 "2016-02-24T19:38:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fkaracso](https://avatars.discourse-cdn.com/v4/letter/f/9f8e36/32.png) [@fkaracso](https://forum.mautic.org/u/fkaracso)
#### Post date: [February 24, 2016, 7:38pm UTC](https://forum.mautic.org/t/error-code-2002/5906/1 "2016-02-24T19:38:50Z")

</div>

I just installed mautic on my distant server and I am getting the following message  
  
  
  
Database connection error (code #2002)  
  
  
  
the error log shows the following  
  
  
  
[Wed Feb 24 19:22:08 2016] [error] [client 109.190.254.1] [host [marketing.iamhappytheproject.com](http://marketing.iamhappytheproject.com)] FastCGI: server “/homez.2055/francoisqe/marketing/index.php” stderr: PHP message: exception ‘PDOException’ with message ‘SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ in /home/francoisqe/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40  
  
  
  
I am not a php guru and I do know how to link the database to mautic.  
  
  
  
However the database is correctly built … mautic just can’t connect to it. Please help me

---

<div class="post-metadata">

### Author: ![fkaracso](https://avatars.discourse-cdn.com/v4/letter/f/9f8e36/32.png) [@fkaracso](https://forum.mautic.org/u/fkaracso)
#### Post date: [February 24, 2016, 7:38pm UTC](https://forum.mautic.org/t/error-code-2002/5906/2 "2016-02-24T19:38:50Z")

</div>

I just installed mautic on my distant server and I am getting the following message

Database connection error (code #2002)

the error log shows the following

[Wed Feb 24 19:22:08 2016] [error] [client 109.190.254.1] [host [marketing.iamhappytheproject.com](http://marketing.iamhappytheproject.com)] FastCGI: server “/homez.2055/francoisqe/marketing/index.php” stderr: PHP message: exception ‘PDOException’ with message ‘SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ in /home/francoisqe/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40

I am not a php guru and I do know how to link the database to mautic.

However the database is correctly built … mautic just can’t connect to it. Please help me
