0

I'm using homestead for laravel. I had installed 2 virtual web site. Two website DB is working good when I tried to migrate. But today I created new website and try to migrate I took error looks like below.

Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = test and table_name = migrations)


and this is my .env file

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:2ZFx67Hrfao+ngk6hmyjDPmmXPiz4hXejJ5ncMqeX5E=
APP_DEBUG=true
APP_URL=http://test.app

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=33060
DB_DATABASE=test
DB_USERNAME=homestead
DB_PASSWORD=secret

and this is homestead.yaml file

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

ssl: true

folders:
    - map: ~/Dev/sites/test
      to: /home/vagrant/sites/test

    - map: ~/Dev/sites/cvms
      to: /home/vagrant/sites/cvms

    - map: ~/Dev/sites/poms
      to: /home/vagrant/sites/poms

sites:
    - map: test.app
      to: /home/vagrant/sites/test/public

    - map: cvms.app
      to: /home/vagrant/sites/cvms/public

    - map: poms.app
      to: /home/vagrant/sites/poms/public

databases:
    - test
    - cvms
    - poms

Of course, that is same before two site's config except DB_DATEBASE item.

I can't understand why It takes error.

and sorry my terrible English....

1

2 Answers 2

0

Try to access your .env file. Check that all the DB names/creditentials are correct as your phpadmin suggests.

DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock

-1

Try running the php artisan migrate command from within the virtual machine. As notified on Laravel's docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.