forked from mysql/mysql-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysql.1
3731 lines (3731 loc) · 74 KB
/
mysql.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
'\" t
.\" Title: \fBmysql\fR
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/04/2018
.\" Manual: MySQL Database System
.\" Source: MySQL 8.0
.\" Language: English
.\"
.TH "\FBMYSQL\FR" "1" "04/04/2018" "MySQL 8\&.0" "MySQL Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mysql \- the MySQL command\-line tool
.SH "SYNOPSIS"
.HP \w'\fBmysql\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
\fBmysql [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
.SH "DESCRIPTION"
.PP
\fBmysql\fR
is a simple SQL shell with input line editing capabilities\&. It supports interactive and noninteractive use\&. When used interactively, query results are presented in an ASCII\-table format\&. When used noninteractively (for example, as a filter), the result is presented in tab\-separated format\&. The output format can be changed using command options\&.
.PP
If you have problems due to insufficient memory for large result sets, use the
\fB\-\-quick\fR
option\&. This forces
\fBmysql\fR
to retrieve results from the server a row at a time rather than retrieving the entire result set and buffering it in memory before displaying it\&. This is done by returning the result set using the
mysql_use_result()
C API function in the client/server library rather than
mysql_store_result()\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
Alternatively, MySQL Shell offers access to the X DevAPI\&. For details, see
Chapter\ \&19, MySQL Shell User Guide\&.
.sp .5v
.RE
.PP
Using
\fBmysql\fR
is very easy\&. Invoke it from the prompt of your command interpreter as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysql \fR\fB\fIdb_name\fR\fR
.fi
.if n \{\
.RE
.\}
.PP
Or:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password \fR\fB\fIdb_name\fR\fR
Enter password: \fIyour_password\fR
.fi
.if n \{\
.RE
.\}
.PP
Then type an SQL statement, end it with
;,
\eg, or
\eG
and press Enter\&.
.PP
Typing
Control+C
interrupts the current statement if there is one, or cancels any partial input line otherwise\&.
.PP
You can execute SQL statements in a script file (batch file) like this:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIscript\&.sql\fR\fR\fB > \fR\fB\fIoutput\&.tab\fR\fR
.fi
.if n \{\
.RE
.\}
.PP
On Unix, the
\fBmysql\fR
client logs statements executed interactively to a history file\&. See
the section called \(lqMYSQL LOGGING\(rq\&.
.SH "MYSQL OPTIONS"
.PP
\fBmysql\fR
supports the following options, which can be specified on the command line or in the
[mysql]
and
[client]
groups of an option file\&. For information about option files used by MySQL programs, see
Section\ \&4.2.6, \(lqUsing Option Files\(rq\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-help\fR,
\fB\-?\fR
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-auto\-rehash\fR
.sp
Enable automatic rehashing\&. This option is on by default, which enables database, table, and column name completion\&. Use
\fB\-\-disable\-auto\-rehash\fR
to disable rehashing\&. That causes
\fBmysql\fR
to start faster, but you must issue the
rehash
command or its
\e#
shortcut if you want to use name completion\&.
.sp
To complete a name, enter the first part and press Tab\&. If the name is unambiguous,
\fBmysql\fR
completes it\&. Otherwise, you can press Tab again to see the possible names that begin with what you have typed so far\&. Completion does not occur if there is no default database\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
This feature requires a MySQL client that is compiled with the
\fBreadline\fR
library\&. Typically, the
\fBreadline\fR
library is not available on Windows\&.
.sp .5v
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-auto\-vertical\-output\fR
.sp
Cause result sets to be displayed vertically if they are too wide for the current window, and using normal tabular format otherwise\&. (This applies to statements terminated by
;
or
\eG\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-batch\fR,
\fB\-B\fR
.sp
Print results using tab as the column separator, with each row on a new line\&. With this option,
\fBmysql\fR
does not use the history file\&.
.sp
Batch mode results in nontabular output format and escaping of special characters\&. Escaping may be disabled by using raw mode; see the description for the
\fB\-\-raw\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-binary\-as\-hex\fR,
\fB\-b\fR
.sp
When this option is given,
\fBmysql\fR
displays binary data using hexadecimal notation (0x\fIvalue\fR)\&. This occurs whether the overall output dislay format is tabular, vertical, HTML, or XML\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-binary\-mode\fR
.sp
This option helps when processing
\fBmysqlbinlog\fR
output that may contain
BLOB
values\&. By default,
\fBmysql\fR
translates
\er\en
in statement strings to
\en
and interprets
\e0
as the statement terminator\&.
\fB\-\-binary\-mode\fR
disables both features\&. It also disables all
\fBmysql\fR
commands except
charset
and
delimiter
in non\-interactive mode (for input piped to
\fBmysql\fR
or loaded using the
source
command)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR
.sp
On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
.sp
The directory where character sets are installed\&. See
Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-column\-names\fR
.sp
Write column names in results\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-column\-type\-info\fR
.sp
Display result set metadata\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-comments\fR,
\fB\-c\fR
.sp
Whether to strip or preserve comments in statements sent to the server\&. The default is
\fB\-\-skip\-comments\fR
(strip comments), enable with
\fB\-\-comments\fR
(preserve comments)\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
The
\fBmysql\fR
client always passes optimizer hints to the server, regardless of whether this option is given\&.
.sp
Comment stripping is deprecated\&. This feature and the options to control it will be removed in a future MySQL release\&.
.sp .5v
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-compress\fR,
\fB\-C\fR
.sp
Compress all information sent between the client and the server if both support compression\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-connect\-expired\-password\fR
.sp
Indicate to the server that the client can handle sandbox mode if the account used to connect has an expired password\&. This can be useful for noninteractive invocations of
\fBmysql\fR
because normally the server disconnects noninteractive clients that attempt to connect using an account with an expired password\&. (See
Section\ \&6.3.9, \(lqServer Handling of Expired Passwords\(rq\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-database=\fR\fB\fIdb_name\fR\fR,
\fB\-D \fR\fB\fIdb_name\fR\fR
.sp
The database to use\&. This is useful primarily in an option file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR
.sp
Write a debugging log\&. A typical
\fIdebug_options\fR
string is
d:t:o,\fIfile_name\fR\&. The default is
d:t:o,/tmp/mysql\&.trace\&.
.sp
This option is available only if MySQL was built using
\fBWITH_DEBUG\fR\&. MySQL release binaries provided by Oracle are
\fInot\fR
built using this option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-debug\-check\fR
.sp
Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-debug\-info\fR,
\fB\-T\fR
.sp
Print debugging information and memory and CPU usage statistics when the program exits\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR
.sp
A hint about the client\-side authentication plugin to use\&. See
Section\ \&6.3.10, \(lqPluggable Authentication\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR
.sp
Use
\fIcharset_name\fR
as the default character set for the client and connection\&.
.sp
This option can be useful if the operating system uses one character set and the
\fBmysql\fR
client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&.
.sp
For more information, see
Section\ \&10.4, \(lqConnection Character Sets and Collations\(rq, and
Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR
.sp
Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&.
\fIfile_name\fR
is interpreted relative to the current directory if given as a relative path name rather than a full path name\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR
.sp
Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&.
\fIfile_name\fR
is interpreted relative to the current directory if given as a relative path name rather than a full path name\&.
.sp
Exception: Even with
\fB\-\-defaults\-file\fR, client programs read
\&.mylogin\&.cnf\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR
.sp
Read not only the usual option groups, but also groups with the usual names and a suffix of
\fIstr\fR\&. For example,
\fBmysql\fR
normally reads the
[client]
and
[mysql]
groups\&. If the
\fB\-\-defaults\-group\-suffix=_other\fR
option is given,
\fBmysql\fR
also reads the
[client_other]
and
[mysql_other]
groups\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-delimiter=\fR\fB\fIstr\fR\fR
.sp
Set the statement delimiter\&. The default is the semicolon character (;)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-disable\-named\-commands\fR
.sp
Disable named commands\&. Use the
\e*
form only, or use named commands only at the beginning of a line ending with a semicolon (;)\&.
\fBmysql\fR
starts with this option
\fIenabled\fR
by default\&. However, even with this option, long\-format commands still work from the first line\&. See
the section called \(lqMYSQL COMMANDS\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-enable\-cleartext\-plugin\fR
.sp
Enable the
mysql_clear_password
cleartext authentication plugin\&. (See
Section\ \&6.5.1.4, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-execute=\fR\fB\fIstatement\fR\fR,
\fB\-e \fR\fB\fIstatement\fR\fR
.sp
Execute the statement and quit\&. The default output format is like that produced with
\fB\-\-batch\fR\&. See
Section\ \&4.2.4, \(lqUsing Options on the Command Line\(rq, for some examples\&. With this option,
\fBmysql\fR
does not use the history file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-force\fR,
\fB\-f\fR
.sp
Continue even if an SQL error occurs\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-get\-server\-public\-key\fR
.sp
Request from the server the public key required for RSA key pair\-based password exchange\&. This option applies to clients that that authenticate with the
caching_sha2_password
authentication plugin\&. For that plugin, the server does not send the public key unless requested\&. This option is ignored for accounts that do not authenticate with that plugin\&. It is also ignored if RSA\-based password exchange is not used, as is the case when the client connects to the server using a secure connection\&.
.sp
If
\fB\-\-server\-public\-key\-path=\fR\fB\fIfile_name\fR\fR
is given and specifies a valid public key file, it takes precedence over
\fB\-\-get\-server\-public\-key\fR\&.
.sp
For information about the
caching_sha2_password
plugin, see
Section\ \&6.5.1.3, \(lqCaching SHA-2 Pluggable Authentication\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-histignore\fR
.sp
A colon\-separated list of one or more patterns specifying statements to ignore for logging purposes\&. These patterns are added to the default pattern list ("*IDENTIFIED*:*PASSWORD*")\&. The value specified for this option affects logging of statements written to the history file, and to
syslog
if the
\fB\-\-syslog\fR
option is given\&. For more information, see
the section called \(lqMYSQL LOGGING\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
Connect to the MySQL server on the given host\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-html\fR,
\fB\-H\fR
.sp
Produce HTML output\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-ignore\-spaces\fR,
\fB\-i\fR
.sp
Ignore spaces after function names\&. The effect of this is described in the discussion for the
IGNORE_SPACE
SQL mode (see
Section\ \&5.1.8, \(lqServer SQL Modes\(rq)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-init\-command=str\fR
.sp
SQL statement to execute after connecting to the server\&. If auto\-reconnect is enabled, the statement is executed again after reconnection occurs\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-line\-numbers\fR
.sp
Write line numbers for errors\&. Disable this with
\fB\-\-skip\-line\-numbers\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-local\-infile[={0|1}]\fR
.sp
Enable or disable
LOCAL
capability for
LOAD DATA INFILE\&. For
\fBmysql\fR, this capability is disabled by default\&. With no value, the option enables
LOCAL\&. The option may be given as
\fB\-\-local\-infile=0\fR
or
\fB\-\-local\-infile=1\fR
to explicitly disable or enable
LOCAL\&. Enabling local data loading also requires that the server permits it; see
Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-login\-path=\fR\fB\fIname\fR\fR
.sp
Read options from the named login path in the
\&.mylogin\&.cnf
login path file\&. A
\(lqlogin path\(rq
is an option group containing options that specify which MySQL server to connect to and which account to authenticate as\&. To create or modify a login path file, use the
\fBmysql_config_editor\fR
utility\&. See
\fBmysql_config_editor\fR(1)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-named\-commands\fR,
\fB\-G\fR
.sp
Enable named
\fBmysql\fR
commands\&. Long\-format commands are permitted, not just short\-format commands\&. For example,
quit
and
\eq
both are recognized\&. Use
\fB\-\-skip\-named\-commands\fR
to disable named commands\&. See
the section called \(lqMYSQL COMMANDS\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-no\-auto\-rehash\fR,
\fB\-A\fR
.sp
This has the same effect as
\fB\-\-skip\-auto\-rehash\fR\&. See the description for
\fB\-\-auto\-rehash\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-no\-beep\fR,
\fB\-b\fR
.sp
Do not beep when errors occur\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-no\-defaults\fR
.sp
Do not read any option files\&. If program startup fails due to reading unknown options from an option file,
\fB\-\-no\-defaults\fR
can be used to prevent them from being read\&.
.sp
The exception is that the
\&.mylogin\&.cnf
file, if it exists, is read in all cases\&. This permits passwords to be specified in a safer way than on the command line even when
\fB\-\-no\-defaults\fR
is used\&. (\&.mylogin\&.cnf
is created by the
\fBmysql_config_editor\fR
utility\&. See
\fBmysql_config_editor\fR(1)\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-one\-database\fR,
\fB\-o\fR
.sp
Ignore statements except those that occur while the default database is the one named on the command line\&. This option is rudimentary and should be used with care\&. Statement filtering is based only on
USE
statements\&.
.sp
Initially,
\fBmysql\fR
executes statements in the input because specifying a database
\fIdb_name\fR
on the command line is equivalent to inserting
USE \fIdb_name\fR
at the beginning of the input\&. Then, for each
USE
statement encountered,
\fBmysql\fR
accepts or rejects following statements depending on whether the database named is the one on the command line\&. The content of the statements is immaterial\&.
.sp
Suppose that
\fBmysql\fR
is invoked to process this set of statements:
.sp
.if n \{\
.RS 4
.\}
.nf
DELETE FROM db2\&.t2;
USE db2;
DROP TABLE db1\&.t1;
CREATE TABLE db1\&.t1 (i INT);
USE db1;
INSERT INTO t1 (i) VALUES(1);
CREATE TABLE db2\&.t1 (j INT);
.fi
.if n \{\
.RE
.\}
.sp
If the command line is
\fBmysql \-\-force \-\-one\-database db1\fR,
\fBmysql\fR
handles the input as follows:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The
DELETE
statement is executed because the default database is
db1, even though the statement names a table in a different database\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The
DROP TABLE
and
CREATE TABLE
statements are not executed because the default database is not
db1, even though the statements name a table in
db1\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The
INSERT
and
CREATE TABLE
statements are executed because the default database is
db1, even though the
CREATE TABLE
statement names a table in a different database\&.
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-pager[=\fR\fB\fIcommand\fR\fR\fB]\fR
.sp
Use the given command for paging query output\&. If the command is omitted, the default pager is the value of your
PAGER
environment variable\&. Valid pagers are
\fBless\fR,
\fBmore\fR,
\fBcat [> filename]\fR, and so forth\&. This option works only on Unix and only in interactive mode\&. To disable paging, use
\fB\-\-skip\-pager\fR\&.
the section called \(lqMYSQL COMMANDS\(rq, discusses output paging further\&.
.RE
.sp
.RS 4
.ie n \{\