ddev

How can I export a database from ddev?

此生再无相见时 提交于 2019-12-06 12:02:51
问题 ddev currently lacks an export-db command (see https://github.com/drud/ddev/issues/767) How can I export a database? 回答1: As of ddev v1.4.0 (2018-11-14), there is a ddev export-db command. You can do these things (from ddev export-db -h ): ddev export-db >/tmp/db.sql.gz ddev export-db --gzip=false >/tmp/db.sql ddev export-db -f /tmp/db.sql.gz In addition, don't forget about ddev snapshot , which is a great and quick way to make a quick dump of your db, but it's not as portable as a text-based

How can ddev automatically create additional databases?

旧街凉风 提交于 2019-12-06 03:47:01
问题 This is a followup question to How can I create and load a second database in ddev?. It is about doing that task automatically . One use case for this is developing a migration to Drupal from another MySQL database, and collaborating with others on the migration. If the database name can be set by ddev, additional developers can get the database created automatically, and additional databases can be added to their settings.local.php, using known values. 回答1: Try this in your project's config

How can I create and load a second database in ddev?

被刻印的时光 ゝ 提交于 2019-11-29 08:11:11
I have a Drupal multisite that needs to have one database for each site, and want it to run in ddev, but ddev just has the one database by default, named 'db'. How can I get a second database? This isn't too hard, but I think it's undocumented at this point, and definitely for advanced users. The root password for the MariaDB container is 'root', so you can mysql -uroot -proot in there, and you can also do it on the host. Assuming you have the mysql client on your host, you can do this: Use ddev describe to get the mysql command and port number. Change the command there to use username=root,

How can I create and load a second database in ddev?

纵然是瞬间 提交于 2019-11-28 01:42:38
问题 I have a Drupal multisite that needs to have one database for each site, and want it to run in ddev, but ddev just has the one database by default, named 'db'. How can I get a second database? 回答1: This isn't too hard, but I think it's undocumented at this point, and definitely for advanced users. The root password for the MariaDB container is 'root', so you can mysql -uroot -proot in there, and you can also do it on the host. Assuming you have the mysql client on your host, you can do this: