dokku-md-plugin icon indicating copy to clipboard operation
dokku-md-plugin copied to clipboard

Initializing the db with a sql file isn't working

Open dana-ross opened this issue 10 years ago • 2 comments

I tried importing a mysqldump of a WordPress database while migrating a site

cat wprunners.sql | dokku mariadb:create wprunners

Based on the "Advanced usage" instructions in the readme. The database is created fine, but it's empty.

dana-ross avatar Apr 04 '14 02:04 dana-ross

Yes it seems to be broken. Meanwhile, you can do it with a mysql command : mysql -uroot -p<password> -h 172.17.42.1 -P <port> db < myfile.sql

Kloadut avatar Apr 04 '14 21:04 Kloadut

Oh yeah, that works. I was just trying to avoid installing mysql-client (and all its dependencies) on the host.

I noticed the mariadb image has mysql-client (or the mariadb equivalent) installed. I'll see if I can come up with something over the weekend. Could use lxc-attach to run the importer after mysqld was started, but now that Docker supports more than just LXC that's probably not the best way to go.

dana-ross avatar Apr 04 '14 21:04 dana-ross