wckr / wocker

Create your WordPress development environment in 3 SECONDS!
https://wocker.dev/
MIT License
480 stars 42 forks source link

access mysql inside wocker #12

Closed balintgaspar closed 9 years ago

balintgaspar commented 9 years ago

How can I access mysql inside wocker? I need this because i need export import databases.

Thanks

ixkaito commented 9 years ago

You can use a Wocker command $ wocker exec to enter a running container, and the simplest way to export / import database is probably using WP-CLI.

Enter the running container

$ vagrant ssh
core@wocker ~ $ wocker exec -it CONTAINER bash

WP-CLI

root@****:/var/www/wordpress# wp --allow-root db

Note: the --allow-root option is required. More information about WP-CLI: http://wp-cli.org/

MySQL

root@****:/var/www/wordpress# mysql -uwordpress -pwordpress

These issues may also help you:

I will improve the documentation about this in the future.