@@ -160,7 +160,7 @@ specified in wp-config.php.
160
160
Checks the current status of the database.
161
161
162
162
~~~
163
- wp db check [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
163
+ wp db check [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
164
164
~~~
165
165
166
166
Runs ` mysqlcheck ` utility with ` --check ` using ` DB_HOST ` ,
@@ -181,6 +181,9 @@ for more details on the `CHECK TABLE` statement.
181
181
[--<field>=<value>]
182
182
Extra arguments to pass to mysqlcheck. [Refer to mysqlcheck docs](https://dev.mysql.com/doc/en/mysqlcheck.html).
183
183
184
+ [--defaults]
185
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
186
+
184
187
** EXAMPLES**
185
188
186
189
$ wp db check
@@ -193,7 +196,7 @@ for more details on the `CHECK TABLE` statement.
193
196
Optimizes the database.
194
197
195
198
~~~
196
- wp db optimize [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
199
+ wp db optimize [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
197
200
~~~
198
201
199
202
Runs ` mysqlcheck ` utility with ` --optimize=true ` using ` DB_HOST ` ,
@@ -214,6 +217,9 @@ for more details on the `OPTIMIZE TABLE` statement.
214
217
[--<field>=<value>]
215
218
Extra arguments to pass to mysqlcheck. [Refer to mysqlcheck docs](https://dev.mysql.com/doc/en/mysqlcheck.html).
216
219
220
+ [--defaults]
221
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
222
+
217
223
** EXAMPLES**
218
224
219
225
$ wp db optimize
@@ -226,7 +232,7 @@ for more details on the `OPTIMIZE TABLE` statement.
226
232
Displays the database table prefix.
227
233
228
234
~~~
229
- wp db prefix
235
+ wp db prefix
230
236
~~~
231
237
232
238
Display the database table prefix, as defined by the database handler's interpretation of the current site.
@@ -243,7 +249,7 @@ Display the database table prefix, as defined by the database handler's interpre
243
249
Repairs the database.
244
250
245
251
~~~
246
- wp db repair [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
252
+ wp db repair [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
247
253
~~~
248
254
249
255
Runs ` mysqlcheck ` utility with ` --repair=true ` using ` DB_HOST ` ,
@@ -264,6 +270,9 @@ more details on the `REPAIR TABLE` statement.
264
270
[--<field>=<value>]
265
271
Extra arguments to pass to mysqlcheck. [Refer to mysqlcheck docs](https://dev.mysql.com/doc/en/mysqlcheck.html).
266
272
273
+ [--defaults]
274
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
275
+
267
276
** EXAMPLES**
268
277
269
278
$ wp db repair
@@ -276,7 +285,7 @@ more details on the `REPAIR TABLE` statement.
276
285
Opens a MySQL console using credentials from wp-config.php
277
286
278
287
~~~
279
- wp db cli [--database=<database>] [--default-character-set=<character-set>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
288
+ wp db cli [--database=<database>] [--default-character-set=<character-set>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
280
289
~~~
281
290
282
291
** OPTIONS**
@@ -296,6 +305,9 @@ wp db cli [--database=<database>] [--default-character-set=<character-set>] [--d
296
305
[--<field>=<value>]
297
306
Extra arguments to pass to mysql. [Refer to mysql docs](https://dev.mysql.com/doc/en/mysql-command-options.html).
298
307
308
+ [--defaults]
309
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
310
+
299
311
** EXAMPLES**
300
312
301
313
# Open MySQL console
@@ -309,7 +321,7 @@ wp db cli [--database=<database>] [--default-character-set=<character-set>] [--d
309
321
Executes a SQL query against the database.
310
322
311
323
~~~
312
- wp db query [<sql>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>]
324
+ wp db query [<sql>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
313
325
~~~
314
326
315
327
Executes an arbitrary SQL query using ` DB_HOST ` , ` DB_NAME ` , ` DB_USER `
@@ -329,6 +341,9 @@ Executes an arbitrary SQL query using `DB_HOST`, `DB_NAME`, `DB_USER`
329
341
[--<field>=<value>]
330
342
Extra arguments to pass to mysql. [Refer to mysql docs](https://dev.mysql.com/doc/en/mysql-command-options.html).
331
343
344
+ [--defaults]
345
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
346
+
332
347
** EXAMPLES**
333
348
334
349
# Execute a query stored in a file
@@ -366,7 +381,7 @@ Executes an arbitrary SQL query using `DB_HOST`, `DB_NAME`, `DB_USER`
366
381
Exports the database to a file or to STDOUT.
367
382
368
383
~~~
369
- wp db export [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--tables=<tables>] [--exclude_tables=<tables>] [--porcelain]
384
+ wp db export [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--tables=<tables>] [--exclude_tables=<tables>] [--porcelain] [--defaults]
370
385
~~~
371
386
372
387
Runs ` mysqldump ` utility using ` DB_HOST ` , ` DB_NAME ` , ` DB_USER ` and
@@ -396,6 +411,9 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and
396
411
[--porcelain]
397
412
Output filename for the exported database.
398
413
414
+ [--defaults]
415
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
416
+
399
417
** EXAMPLES**
400
418
401
419
# Export database with drop query included
@@ -450,7 +468,7 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and
450
468
Imports a database from a file or from STDIN.
451
469
452
470
~~~
453
- wp db import [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--skip-optimization]
471
+ wp db import [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--skip-optimization] [--defaults]
454
472
~~~
455
473
456
474
Runs SQL queries using ` DB_HOST ` , ` DB_NAME ` , ` DB_USER ` and
@@ -475,6 +493,9 @@ defined in the SQL.
475
493
[--skip-optimization]
476
494
When using an SQL file, do not include speed optimization such as disabling auto-commit and key checks.
477
495
496
+ [--defaults]
497
+ Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
498
+
478
499
** EXAMPLES**
479
500
480
501
# Import MySQL from a file.
0 commit comments