【发布时间】:2019-07-24 18:03:10
【问题描述】:
我将宅基地用于 laravel。 我已经安装了 2 个虚拟网站。当我尝试迁移时,两个网站数据库运行良好。但是今天我创建了新网站并尝试迁移,我发现错误如下所示。
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)
这是我的 .env 文件
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
这是 homestead.yaml 文件
---
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
当然,除了 DB_DATEBASE 项之外,两个站点的配置之前都是一样的。
我不明白为什么会出错。
对不起,我糟糕的英语......
【问题讨论】: