~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to man/mysqlaccess.1

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: \fBmysqlaccess\fR
 
3
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
 
5
.\"      Date: 03/01/2010
 
6
.\"    Manual: MySQL Database System
 
7
.\"    Source: MySQL 5.1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "\FBMYSQLACCESS\FR" "1" "03/01/2010" "MySQL 5\&.1" "MySQL Database System"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.\" mysqlaccess
 
22
.SH "NAME"
 
23
mysqlaccess \- client for checking access privileges
 
24
.SH "SYNOPSIS"
 
25
.HP \w'\fBmysqlaccess\ [\fR\fB\fIhost_name\fR\fR\fB\ [\fR\fB\fIuser_name\fR\fR\fB\ [\fR\fB\fIdb_name\fR\fR\fB]]]\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
 
26
\fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB [\fR\fB\fIdb_name\fR\fR\fB]]] [\fR\fB\fIoptions\fR\fR\fB]\fR
 
27
.SH "DESCRIPTION"
 
28
.PP
 
29
\fBmysqlaccess\fR
 
30
is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. Note that
 
31
\fBmysqlaccess\fR
 
32
checks access using only the
 
33
user,
 
34
db, and
 
35
host
 
36
tables\&. It does not check table, column, or routine privileges specified in the
 
37
tables_priv,
 
38
columns_priv, or
 
39
procs_priv
 
40
tables\&.
 
41
.PP
 
42
Invoke
 
43
\fBmysqlaccess\fR
 
44
like this:
 
45
.sp
 
46
.if n \{\
 
47
.RS 4
 
48
.\}
 
49
.nf
 
50
shell> \fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB [\fR\fB\fIdb_name\fR\fR\fB]]] [\fR\fB\fIoptions\fR\fR\fB]\fR
 
51
.fi
 
52
.if n \{\
 
53
.RE
 
54
.\}
 
55
.PP
 
56
\fBmysqlaccess\fR
 
57
supports the following options\&.
 
58
.sp
 
59
.RS 4
 
60
.ie n \{\
 
61
\h'-04'\(bu\h'+03'\c
 
62
.\}
 
63
.el \{\
 
64
.sp -1
 
65
.IP \(bu 2.3
 
66
.\}
 
67
.\" mysqlaccess: help option
 
68
.\" help option: mysqlaccess
 
69
\fB\-\-help\fR,
 
70
\fB\-?\fR
 
71
.sp
 
72
Display a help message and exit\&.
 
73
.RE
 
74
.sp
 
75
.RS 4
 
76
.ie n \{\
 
77
\h'-04'\(bu\h'+03'\c
 
78
.\}
 
79
.el \{\
 
80
.sp -1
 
81
.IP \(bu 2.3
 
82
.\}
 
83
.\" mysqlaccess: brief option
 
84
.\" brief option: mysqlaccess
 
85
\fB\-\-brief\fR,
 
86
\fB\-b\fR
 
87
.sp
 
88
Generate reports in single\-line tabular format\&.
 
89
.RE
 
90
.sp
 
91
.RS 4
 
92
.ie n \{\
 
93
\h'-04'\(bu\h'+03'\c
 
94
.\}
 
95
.el \{\
 
96
.sp -1
 
97
.IP \(bu 2.3
 
98
.\}
 
99
.\" mysqlaccess: commit option
 
100
.\" commit option: mysqlaccess
 
101
\fB\-\-commit\fR
 
102
.sp
 
103
Copy the new access privileges from the temporary tables to the original grant tables\&. The grant tables must be flushed for the new privileges to take effect\&. (For example, execute a
 
104
\fBmysqladmin reload\fR
 
105
command\&.)
 
106
.RE
 
107
.sp
 
108
.RS 4
 
109
.ie n \{\
 
110
\h'-04'\(bu\h'+03'\c
 
111
.\}
 
112
.el \{\
 
113
.sp -1
 
114
.IP \(bu 2.3
 
115
.\}
 
116
.\" mysqlaccess: copy option
 
117
.\" copy option: mysqlaccess
 
118
\fB\-\-copy\fR
 
119
.sp
 
120
Reload the temporary grant tables from original ones\&.
 
121
.RE
 
122
.sp
 
123
.RS 4
 
124
.ie n \{\
 
125
\h'-04'\(bu\h'+03'\c
 
126
.\}
 
127
.el \{\
 
128
.sp -1
 
129
.IP \(bu 2.3
 
130
.\}
 
131
.\" mysqlaccess: db option
 
132
.\" db option: mysqlaccess
 
133
\fB\-\-db=\fR\fB\fIdb_name\fR\fR,
 
134
\fB\-d \fR\fB\fIdb_name\fR\fR
 
135
.sp
 
136
Specify the database name\&.
 
137
.RE
 
138
.sp
 
139
.RS 4
 
140
.ie n \{\
 
141
\h'-04'\(bu\h'+03'\c
 
142
.\}
 
143
.el \{\
 
144
.sp -1
 
145
.IP \(bu 2.3
 
146
.\}
 
147
.\" mysqlaccess: debug option
 
148
.\" debug option: mysqlaccess
 
149
\fB\-\-debug=\fR\fB\fIN\fR\fR
 
150
.sp
 
151
Specify the debug level\&.
 
152
\fIN\fR
 
153
can be an integer from 0 to 3\&.
 
154
.RE
 
155
.sp
 
156
.RS 4
 
157
.ie n \{\
 
158
\h'-04'\(bu\h'+03'\c
 
159
.\}
 
160
.el \{\
 
161
.sp -1
 
162
.IP \(bu 2.3
 
163
.\}
 
164
.\" mysqlaccess: host option
 
165
.\" host option: mysqlaccess
 
166
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
 
167
\fB\-h \fR\fB\fIhost_name\fR\fR
 
168
.sp
 
169
The host name to use in the access privileges\&.
 
170
.RE
 
171
.sp
 
172
.RS 4
 
173
.ie n \{\
 
174
\h'-04'\(bu\h'+03'\c
 
175
.\}
 
176
.el \{\
 
177
.sp -1
 
178
.IP \(bu 2.3
 
179
.\}
 
180
.\" mysqlaccess: howto option
 
181
.\" howto option: mysqlaccess
 
182
\fB\-\-howto\fR
 
183
.sp
 
184
Display some examples that show how to use
 
185
\fBmysqlaccess\fR\&.
 
186
.RE
 
187
.sp
 
188
.RS 4
 
189
.ie n \{\
 
190
\h'-04'\(bu\h'+03'\c
 
191
.\}
 
192
.el \{\
 
193
.sp -1
 
194
.IP \(bu 2.3
 
195
.\}
 
196
.\" mysqlaccess: old_server option
 
197
.\" old_server option: mysqlaccess
 
198
\fB\-\-old_server\fR
 
199
.sp
 
200
Assume that the server is an old MySQL server (before MySQL 3\&.21) that does not yet know how to handle full
 
201
WHERE
 
202
clauses\&.
 
203
.RE
 
204
.sp
 
205
.RS 4
 
206
.ie n \{\
 
207
\h'-04'\(bu\h'+03'\c
 
208
.\}
 
209
.el \{\
 
210
.sp -1
 
211
.IP \(bu 2.3
 
212
.\}
 
213
.\" mysqlaccess: password option
 
214
.\" password option: mysqlaccess
 
215
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
 
216
\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
 
217
.sp
 
218
The password to use when connecting to the server\&. If you omit the
 
219
\fIpassword\fR
 
220
value following the
 
221
\fB\-\-password\fR
 
222
or
 
223
\fB\-p\fR
 
224
option on the command line,
 
225
\fBmysqlaccess\fR
 
226
prompts for one\&.
 
227
.sp
 
228
Specifying a password on the command line should be considered insecure\&. See
 
229
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
 
230
.RE
 
231
.sp
 
232
.RS 4
 
233
.ie n \{\
 
234
\h'-04'\(bu\h'+03'\c
 
235
.\}
 
236
.el \{\
 
237
.sp -1
 
238
.IP \(bu 2.3
 
239
.\}
 
240
.\" mysqlaccess: plan option
 
241
.\" plan option: mysqlaccess
 
242
\fB\-\-plan\fR
 
243
.sp
 
244
Display suggestions and ideas for future releases\&.
 
245
.RE
 
246
.sp
 
247
.RS 4
 
248
.ie n \{\
 
249
\h'-04'\(bu\h'+03'\c
 
250
.\}
 
251
.el \{\
 
252
.sp -1
 
253
.IP \(bu 2.3
 
254
.\}
 
255
.\" mysqlaccess: preview option
 
256
.\" preview option: mysqlaccess
 
257
\fB\-\-preview\fR
 
258
.sp
 
259
Show the privilege differences after making changes to the temporary grant tables\&.
 
260
.RE
 
261
.sp
 
262
.RS 4
 
263
.ie n \{\
 
264
\h'-04'\(bu\h'+03'\c
 
265
.\}
 
266
.el \{\
 
267
.sp -1
 
268
.IP \(bu 2.3
 
269
.\}
 
270
.\" mysqlaccess: relnotes option
 
271
.\" relnotes option: mysqlaccess
 
272
\fB\-\-relnotes\fR
 
273
.sp
 
274
Display the release notes\&.
 
275
.RE
 
276
.sp
 
277
.RS 4
 
278
.ie n \{\
 
279
\h'-04'\(bu\h'+03'\c
 
280
.\}
 
281
.el \{\
 
282
.sp -1
 
283
.IP \(bu 2.3
 
284
.\}
 
285
.\" mysqlaccess: rhost option
 
286
.\" rhost option: mysqlaccess
 
287
\fB\-\-rhost=\fR\fB\fIhost_name\fR\fR,
 
288
\fB\-H \fR\fB\fIhost_name\fR\fR
 
289
.sp
 
290
Connect to the MySQL server on the given host\&.
 
291
.RE
 
292
.sp
 
293
.RS 4
 
294
.ie n \{\
 
295
\h'-04'\(bu\h'+03'\c
 
296
.\}
 
297
.el \{\
 
298
.sp -1
 
299
.IP \(bu 2.3
 
300
.\}
 
301
.\" mysqlaccess: rollback option
 
302
.\" rollback option: mysqlaccess
 
303
\fB\-\-rollback\fR
 
304
.sp
 
305
Undo the most recent changes to the temporary grant tables\&.
 
306
.RE
 
307
.sp
 
308
.RS 4
 
309
.ie n \{\
 
310
\h'-04'\(bu\h'+03'\c
 
311
.\}
 
312
.el \{\
 
313
.sp -1
 
314
.IP \(bu 2.3
 
315
.\}
 
316
.\" mysqlaccess: spassword option
 
317
.\" spassword option: mysqlaccess
 
318
\fB\-\-spassword[=\fR\fB\fIpassword\fR\fR\fB]\fR,
 
319
\fB\-P[\fR\fB\fIpassword\fR\fR\fB]\fR
 
320
.sp
 
321
The password to use when connecting to the server as the superuser\&. If you omit the
 
322
\fIpassword\fR
 
323
value following the
 
324
\fB\-\-spassword\fR
 
325
or
 
326
\fB\-p\fR
 
327
option on the command line,
 
328
\fBmysqlaccess\fR
 
329
prompts for one\&.
 
330
.sp
 
331
Specifying a password on the command line should be considered insecure\&. See
 
332
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
 
333
.RE
 
334
.sp
 
335
.RS 4
 
336
.ie n \{\
 
337
\h'-04'\(bu\h'+03'\c
 
338
.\}
 
339
.el \{\
 
340
.sp -1
 
341
.IP \(bu 2.3
 
342
.\}
 
343
.\" mysqlaccess: superuser option
 
344
.\" superuser option: mysqlaccess
 
345
\fB\-\-superuser=\fR\fB\fIuser_name\fR\fR,
 
346
\fB\-U \fR\fB\fIuser_name\fR\fR
 
347
.sp
 
348
Specify the user name for connecting as the superuser\&.
 
349
.RE
 
350
.sp
 
351
.RS 4
 
352
.ie n \{\
 
353
\h'-04'\(bu\h'+03'\c
 
354
.\}
 
355
.el \{\
 
356
.sp -1
 
357
.IP \(bu 2.3
 
358
.\}
 
359
.\" mysqlaccess: table option
 
360
.\" table option: mysqlaccess
 
361
\fB\-\-table\fR,
 
362
\fB\-t\fR
 
363
.sp
 
364
Generate reports in table format\&.
 
365
.RE
 
366
.sp
 
367
.RS 4
 
368
.ie n \{\
 
369
\h'-04'\(bu\h'+03'\c
 
370
.\}
 
371
.el \{\
 
372
.sp -1
 
373
.IP \(bu 2.3
 
374
.\}
 
375
.\" mysqlaccess: user option
 
376
.\" user option: mysqlaccess
 
377
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
 
378
\fB\-u \fR\fB\fIuser_name\fR\fR
 
379
.sp
 
380
The user name to use in the access privileges\&.
 
381
.RE
 
382
.sp
 
383
.RS 4
 
384
.ie n \{\
 
385
\h'-04'\(bu\h'+03'\c
 
386
.\}
 
387
.el \{\
 
388
.sp -1
 
389
.IP \(bu 2.3
 
390
.\}
 
391
.\" mysqlaccess: version option
 
392
.\" version option: mysqlaccess
 
393
\fB\-\-version\fR,
 
394
\fB\-v\fR
 
395
.sp
 
396
Display version information and exit\&.
 
397
.RE
 
398
.PP
 
399
If your MySQL distribution is installed in some nonstandard location, you must change the location where
 
400
\fBmysqlaccess\fR
 
401
expects to find the
 
402
\fBmysql\fR
 
403
client\&. Edit the
 
404
mysqlaccess
 
405
script at approximately line 18\&. Search for a line that looks like this:
 
406
.sp
 
407
.if n \{\
 
408
.RS 4
 
409
.\}
 
410
.nf
 
411
$MYSQL     = \'/usr/local/bin/mysql\';    # path to mysql executable
 
412
.fi
 
413
.if n \{\
 
414
.RE
 
415
.\}
 
416
.PP
 
417
Change the path to reflect the location where
 
418
\fBmysql\fR
 
419
actually is stored on your system\&. If you do not do this, a
 
420
Broken pipe
 
421
error will occur when you run
 
422
\fBmysqlaccess\fR\&.
 
423
.SH "COPYRIGHT"
 
424
.br
 
425
.PP
 
426
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
 
427
.PP
 
428
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 
429
.PP
 
430
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
431
.PP
 
432
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
 
433
.sp
 
434
.SH "SEE ALSO"
 
435
For more information, please refer to the MySQL Reference Manual,
 
436
which may already be installed locally and which is also available
 
437
online at http://dev.mysql.com/doc/.
 
438
.SH AUTHOR
 
439
Sun Microsystems, Inc. (http://www.mysql.com/).