# Ubuntu 14.04 - Laravel - Migrations fail, database not found

**URL:** <https://discuss.circleci.com/t/ubuntu-14-04-laravel-migrations-fail-database-not-found/10462>\
**Category:** Build Environment\
**Tags:** circle-yml\
**Created:** [February 19, 2017, 3:00pm UTC](https://discuss.circleci.com/t/ubuntu-14-04-laravel-migrations-fail-database-not-found/10462 "2017-02-19T15:00:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/coreation/32/15482_2.png) [@coreation](https://discuss.circleci.com/u/coreation)\
**Post date:** [February 19, 2017, 3:00pm UTC](https://discuss.circleci.com/t/ubuntu-14-04-laravel-migrations-fail-database-not-found/10462/1 "2017-02-19T15:00:26Z")

</div>

Hi all,

Some of my unittests (Laravel 5.3 application) fail because the migrations can’t be executed, the error is the following:

> SQLSTATE[HY000] [2002] No such file or directory (SQL: select \* from information\_schema.tables where table\_schema = circle\_test and table\_name = migrations)

My setup is

> machine:  
> php:  
> version: 7.0.11  
> environment:  
> ENVIRONMENT: testing  
> DB\_URL: 127.0.0.1  
> DB\_NAME: circle\_test  
> DB\_USER: ubuntu  
> DB\_CONNECTION: mysql\_test  
> APP\_KEY: abcde…  
> services:  
> - elasticsearch  
> dependencies:  
> pre:  
> - echo “memory\_limit = 1024M” \> /opt/circleci/php/$(phpenv global)/etc/conf.d/memory.ini  
> override:  
> - composer install --no-interaction --no-scripts  
> post:  
> - wget [https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.5/elasticsearch-2.3.5.tar.gz](https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.5/elasticsearch-2.3.5.tar.gz)  
> - tar -xvf elasticsearch-2.3.5.tar.gz  
> - elasticsearch-2.3.5/bin/elasticsearch: {background: true}  
> # Make sure that Elasticsearch is up before running tests:  
> - sleep 10 && wget --waitretry=5 --retry-connrefused -v [http://127.0.0.1:9200/](http://127.0.0.1:9200/)

Not sure where it goes wrong, perhaps the user isn’t the correct one (ubuntu), I have not provided a custom .env file, all of the environment variables are quite probably correct, circle\_test as a database and ubuntu as the user.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:39am UTC](https://discuss.circleci.com/t/ubuntu-14-04-laravel-migrations-fail-database-not-found/10462/2 "2018-06-18T11:39:11Z")

</div>


