wp db cli
Opens a MySQL console using credentials from wp-config.php
Options
Name | Description |
---|---|
--database <database> | Use a specific database. Defaults to DB_NAME |
--default-character-set <character-set> | Use a specific character set. Defaults to DB_CHARSET when defined |
--dbuser <value> | Username to pass to mysql. Defaults to DB_USER |
--dbpass <value> | Password to pass to mysql. Defaults to DB_PASSWORD |
--field=value | Extra arguments to pass to mysql. Refer to mysql docs |
--defaults | Loads the environment’s MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration |