I'm trying to export a database from my ddev project (on a Mac).
I tried creating a .tarball directory in /var/www/html using the ddev ssh command. The docs say, that this directory would show up in my project folder. However, I can't see the directory and thus I'm not sure how I could copy the db-dump from my docker container to my «local» hard-drive.
I also tried using ddev export-db --file=/tmp/db.sql.gz
But this throws an error: mysqldump: Got error: 1449: "The user specified as a definer ('redacted'@'%') does not exist" when using LOCK TABLES
I ended up using ddev phpmyadmin for the export, but I'd rather use one of the built in ddev commands, since the database is pretty big and takes quite long to export using phpmyadmin.
The problem was that I had views defined in my database that were imported from a live-db. The username, that ddev didn't like was set as «definer» in the views (hence the error message when trying to export the db).
I created the user using phpmyadmin and now the export works.