# Error while running console command

**URL:** <https://forum.mautic.org/t/error-while-running-console-command/7909>\
**Category:** Product Support\
**Created:** [March 13, 2017, 4:14pm UTC](https://forum.mautic.org/t/error-while-running-console-command/7909 "2017-03-13T16:14:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobotJoosen](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@RobotJoosen](https://forum.mautic.org/u/RobotJoosen)\
**Post date:** [March 13, 2017, 4:14pm UTC](https://forum.mautic.org/t/error-while-running-console-command/7909/1 "2017-03-13T16:14:16Z")

</div>

Hi Guys,  
  
  
  
I’m new here and trying to setup my first serious installation of Mautic. But i’m running into some errors and don’t know how to trace and fix the issues. Can anyone help me out? The error from the log file shows this code.

Code:

[2017-03-13 15:42:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:messages:send` [] [] [2017-03-13 15:45:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:segments:update` [] [] [2017-03-13 15:50:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:rebuild` [] [] [2017-03-13 15:50:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:trigger` [] [] [2017-03-13 15:57:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:messages:send` [] [] [2017-03-13 16:00:12] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:segments:update` [] [] [2017-03-13 16:05:01] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:rebuild` [] [] [2017-03-13 16:05:01] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:trigger` [] []

  
Kind regards,  
  
Roald Joosen

---

<div class="post-metadata">

**Author:** ![RobotJoosen](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@RobotJoosen](https://forum.mautic.org/u/RobotJoosen)\
**Post date:** [March 13, 2017, 4:14pm UTC](https://forum.mautic.org/t/error-while-running-console-command/7909/2 "2017-03-13T16:14:16Z")

</div>

Hi Guys,

I’m new here and trying to setup my first serious installation of Mautic. But i’m running into some errors and don’t know how to trace and fix the issues. Can anyone help me out? The error from the log file shows this code.

```auto
[2017-03-13 15:42:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:messages:send` [] []
[2017-03-13 15:45:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:segments:update` [] []
[2017-03-13 15:50:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:rebuild` [] []
[2017-03-13 15:50:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:trigger` [] []
[2017-03-13 15:57:02] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:messages:send` [] []
[2017-03-13 16:00:12] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:segments:update` [] []
[2017-03-13 16:05:01] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:rebuild` [] []
[2017-03-13 16:05:01] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:trigger` [] []
```

Kind regards,

Roald Joosen

---

<div class="post-metadata">

**Author:** ![RobotJoosen](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@RobotJoosen](https://forum.mautic.org/u/RobotJoosen)\
**Post date:** [March 14, 2017, 12:46pm UTC](https://forum.mautic.org/t/error-while-running-console-command/7909/3 "2017-03-14T12:46:44Z")

</div>

So the issue is fixed… Simple mistake:

I didn’t use the full path /paas/c0000/www/app/console but used /www/app/console

---

<div class="post-metadata">

**Author:** ![mbrinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mbrinson/32/116_2.png) [@mbrinson](https://forum.mautic.org/u/mbrinson)\
**Post date:** [September 7, 2017, 8:28pm UTC](https://forum.mautic.org/t/error-while-running-console-command/7909/4 "2017-09-07T20:28:30Z")

</div>

Where exactly were you not using the full path RobotJoosen? I’m running into the same problem, but just after an upgrade to the latest (2.10.0). I wasn’t running into this problem before and I haven’t changed any file paths.

---

<div class="post-metadata">

**Author:** ![KHunt](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@KHunt](https://forum.mautic.org/u/KHunt)\
**Post date:** [September 13, 2017, 12:06pm UTC](https://forum.mautic.org/t/error-while-running-console-command/7909/5 "2017-09-13T12:06:33Z")

</div>

Im having the same issue and I am running with full paths, I am running a local dev env under MAMP pro on Mac.

[2017-09-13 12:44:30] mautic.NOTICE: DoctrineDBALExceptionConnectionException: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory (uncaught exception) at /Applications/MAMP/htdocs/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 while running console command `mautic:campaigns:trigger` [] []

command Im running from the command line: php /Applications/MAMP/htdocs/mautic/app/console mautic:campaigns:trigger  
php: version PHP 7.0.22
