[英]Why laradock use one database for different project?
I use standart laradock https://laradock.io/我使用标准的 laradock https://laradock.io/
And I have two project in different folders.我在不同的文件夹中有两个项目。
E:\laravel\smskin\blog\laradock
And和
E:\laravel\JSONAPI\blog\laradock
I can start every project, and is realy different projects:我可以启动每个项目,而且是真正不同的项目:
docker-compose up -d nginx mysql workspace phpmyadmin php-worker
But, why is projects use one database?但是,为什么项目使用一个数据库? Identical tables, changes in one project database are reflected in another.
相同的表,一个项目数据库中的更改会反映在另一个项目数据库中。 I want to use different databases for different projects.
我想为不同的项目使用不同的数据库。 Where does the larodok store the data?
larodok 将数据存储在哪里?
You have 2 projects.你有 2 个项目。 Both projects have their own
.env
file.这两个项目都有自己的
.env
文件。 But in your case the settings in both these files are equal.但在您的情况下,这两个文件中的设置是相同的。 Hence, both projects share 1 database.
因此,两个项目共享 1 个数据库。
Change the settings in one of the .env
files to match a different database.更改其中一个
.env
文件中的设置以匹配不同的数据库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.