public function cli( $args, $assoc_args ) {
		if ( ! isset( $assoc_args['database'] ) ) {
			$assoc_args['database'] = DB_NAME;
		}

		self::run( '/usr/bin/env mysql --no-defaults --no-auto-rehash', $assoc_args );
	}
public function cli( $args, $assoc_args ) {
		if ( ! isset( $assoc_args['database'] ) ) {
			$assoc_args['database'] = DB_NAME;
		}

		self::run( '/usr/bin/env mysql --no-defaults --no-auto-rehash', $assoc_args );
	}
public function cli ( $ args , $ assoc_args ) { if ( ! isset ( $ assoc_args [ 'database' ] ) ) { $ assoc_args [ 'database' ] = DB_NAME ; } self :: run ( '/usr/bin/env mysql --no-defaults --no-auto-rehash' , $ assoc_args ) ; }
Opens a MySQL console using credentials from wp-config.php

## OPTIONS

[--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](https://dev.mysql.com/doc/en/mysql-command-options.html).

## EXAMPLES

# Open MySQL console
$ wp db cli
mysql>

@alias connect
Opens a MySQL console using credentials from wp - config . php