@@ -81,7 +81,7 @@ wp db create [--dbuser=<value>] [--dbpass=<value>] [--defaults]
8181
8282Runs ` CREATE_DATABASE ` SQL statement using ` DB_HOST ` , ` DB_NAME ` ,
8383` DB_USER ` and ` DB_PASSWORD ` database credentials specified in
84- wp-config.php.
84+ wp-config.php. Requires MySQL/MariaDB client binaries to be available.
8585
8686** OPTIONS**
8787
@@ -111,7 +111,7 @@ wp db drop [--dbuser=<value>] [--dbpass=<value>] [--yes] [--defaults]
111111
112112Runs ` DROP_DATABASE ` SQL statement using ` DB_HOST ` , ` DB_NAME ` ,
113113` DB_USER ` and ` DB_PASSWORD ` database credentials specified in
114- wp-config.php.
114+ wp-config.php. Requires MySQL/MariaDB client binaries to be available.
115115
116116** OPTIONS**
117117
@@ -144,7 +144,7 @@ wp db reset [--dbuser=<value>] [--dbpass=<value>] [--yes] [--defaults]
144144
145145Runs ` DROP_DATABASE ` and ` CREATE_DATABASE ` SQL statements using
146146` DB_HOST ` , ` DB_NAME ` , ` DB_USER ` and ` DB_PASSWORD ` database credentials
147- specified in wp-config.php.
147+ specified in wp-config.php. Requires MySQL/MariaDB client binaries to be available.
148148
149149** OPTIONS**
150150
@@ -177,7 +177,7 @@ wp db check [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--default
177177
178178Runs ` mysqlcheck ` utility with ` --check ` using ` DB_HOST ` ,
179179` DB_NAME ` , ` DB_USER ` and ` DB_PASSWORD ` database credentials
180- specified in wp-config.php.
180+ specified in wp-config.php. Requires ` mysqlcheck ` or ` mariadb-check ` client binary.
181181
182182[ See docs] ( http://dev.mysql.com/doc/refman/5.7/en/check-table.html )
183183for more details on the ` CHECK TABLE ` statement.
@@ -216,7 +216,7 @@ wp db optimize [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defa
216216
217217Runs ` mysqlcheck ` utility with ` --optimize=true ` using ` DB_HOST ` ,
218218` DB_NAME ` , ` DB_USER ` and ` DB_PASSWORD ` database credentials
219- specified in wp-config.php.
219+ specified in wp-config.php. Requires ` mysqlcheck ` or ` mariadb-check ` client binary.
220220
221221[ See docs] ( http://dev.mysql.com/doc/refman/5.7/en/optimize-table.html )
222222for more details on the ` OPTIMIZE TABLE ` statement.
@@ -269,7 +269,7 @@ wp db repair [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaul
269269
270270Runs ` mysqlcheck ` utility with ` --repair=true ` using ` DB_HOST ` ,
271271` DB_NAME ` , ` DB_USER ` and ` DB_PASSWORD ` database credentials
272- specified in wp-config.php.
272+ specified in wp-config.php. Requires ` mysqlcheck ` or ` mariadb-check ` client binary.
273273
274274[ See docs] ( http://dev.mysql.com/doc/refman/5.7/en/repair-table.html ) for
275275more details on the ` REPAIR TABLE ` statement.
@@ -297,14 +297,16 @@ more details on the `REPAIR TABLE` statement.
297297
298298### wp db cli
299299
300- Opens a MySQL console using credentials from wp-config.php
300+ Opens a MySQL console using credentials from wp-config.php.
301301
302302~~~
303303wp db cli [--database=<database>] [--default-character-set=<character-set>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
304304~~~
305305
306306** Alias:** ` connect `
307307
308+ Requires ` mysql ` or ` mariadb ` client binary to be available.
309+
308310** OPTIONS**
309311
310312 [--database=<database>]
@@ -342,7 +344,9 @@ wp db query [<sql>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [-
342344~~~
343345
344346Executes an arbitrary SQL query using ` DB_HOST ` , ` DB_NAME ` , ` DB_USER `
345- and ` DB_PASSWORD ` database credentials specified in wp-config.php.
347+ and ` DB_PASSWORD ` database credentials specified in wp-config.php.
348+ If MySQL/MariaDB client binaries are not available, falls back to
349+ executing queries via WordPress's ` wpdb ` .
346350
347351Use the ` --skip-column-names ` MySQL argument to exclude the headers
348352from a SELECT query. Pipe the output to remove the ASCII table
@@ -445,6 +449,7 @@ wp db export [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
445449
446450Runs ` mysqldump ` utility using ` DB_HOST ` , ` DB_NAME ` , ` DB_USER ` and
447451` DB_PASSWORD ` database credentials specified in wp-config.php. Accepts any valid [ ` mysqldump ` flags] ( https://dev.mysql.com/doc/en/mysqldump.html#mysqldump-option-summary ) .
452+ Requires ` mysqldump ` or ` mariadb-dump ` client binary to be available.
448453
449454** OPTIONS**
450455
@@ -536,7 +541,8 @@ wp db import [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
536541Runs SQL queries using ` DB_HOST ` , ` DB_NAME ` , ` DB_USER ` and
537542` DB_PASSWORD ` database credentials specified in wp-config.php. This
538543does not create database by itself and only performs whatever tasks are
539- defined in the SQL.
544+ defined in the SQL. If MySQL/MariaDB client binaries are not available,
545+ falls back to importing via WordPress's ` wpdb ` .
540546
541547** OPTIONS**
542548
0 commit comments