2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \"
2023-03-11 16:00:19 -08:00
.TH "\fBMARIADB-ACCESS\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" mysqlaccess
2009-05-25 11:59:47 +02:00
.SH "NAME"
2022-05-27 15:04:31 +00:00
mariadb-access \- client for checking access privileges (mysqlaccess is now a symlink to mariadb-access)
2009-05-25 11:59:47 +02:00
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.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
2009-05-25 11:59:47 +02:00
\fB mysqlaccess [\fR \fB \fI host_name\fR \fR \fB [\fR \fB \fI user_name\fR \fR \fB [\fR \fB \fI db_name\fR \fR \fB ]]] [\fR \fB \fI options\fR \fR \fB ]\fR
.SH "DESCRIPTION"
.PP
\fB mysqlaccess\fR
2015-09-09 14:32:52 +02:00
is a diagnostic tool written by Yves Carlier\& . It checks the access privileges for a host name, user name, and database combination\& . Note that
2009-05-25 11:59:47 +02:00
\fB mysqlaccess\fR
checks access using only the
user,
db, and
host
2009-09-16 14:03:18 +02:00
tables\& . It does not check table, column, or routine privileges specified in the
2009-05-25 11:59:47 +02:00
tables_priv,
columns_priv, or
procs_priv
2009-09-16 14:03:18 +02:00
tables\& .
2009-05-25 11:59:47 +02:00
.PP
Invoke
\fB mysqlaccess\fR
like this:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysqlaccess [\fR \fB \fI host_name\fR \fR \fB [\fR \fB \fI user_name\fR \fR \fB [\fR \fB \fI db_name\fR \fR \fB ]]] [\fR \fB \fI options\fR \fR \fB ]\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
\fB mysqlaccess\fR
2010-04-28 15:06:11 +02:00
supports the following options\& .
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: help option
. \" help option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- help\fR ,
\fB \- ?\fR
.sp
2009-09-16 14:03:18 +02:00
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
. \}
. \" mysqlaccess: brief option
. \" brief option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- brief\fR ,
\fB \- b\fR
.sp
2009-09-16 14:03:18 +02:00
Generate reports in single\- line tabular format\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: commit option
. \" commit option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- commit\fR
.sp
2009-09-16 14:03:18 +02:00
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
2009-05-25 11:59:47 +02:00
\fB mysqladmin reload\fR
2009-09-16 14:03:18 +02:00
command\& .)
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: copy option
. \" copy option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- copy\fR
.sp
2009-09-16 14:03:18 +02:00
Reload the temporary grant tables from original ones\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: db option
. \" db option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- db=\fR \fB \fI db_name\fR \fR ,
\fB \- d \fR \fB \fI db_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Specify the database name\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: debug option
. \" debug option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- debug=\fR \fB \fI N\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Specify the debug level\& .
2009-05-25 11:59:47 +02:00
\fI N\fR
2009-09-16 14:03:18 +02:00
can be an integer from 0 to 3\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: host option
. \" host option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- host=\fR \fB \fI host_name\fR \fR ,
\fB \- h \fR \fB \fI host_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The host name to use in the access privileges\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: howto option
. \" howto option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- howto\fR
.sp
Display some examples that show how to use
2009-09-16 14:03:18 +02:00
\fB mysqlaccess\fR \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: old_server option
. \" old_server option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- old_server\fR
.sp
2015-09-09 14:32:52 +02:00
Connect to a very old MySQL server (before MySQL 3\& .21) that does not know how to handle full
WHERE clauses\& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: password option
. \" password option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- password[=\fR \fB \fI password\fR \fR \fB ]\fR ,
\fB \- p[\fR \fB \fI password\fR \fR \fB ]\fR
.sp
2009-09-16 14:03:18 +02:00
The password to use when connecting to the server\& . If you omit the
2009-05-25 11:59:47 +02:00
\fI password\fR
value following the
\fB \- \- password\fR
or
\fB \- p\fR
2010-04-28 15:06:11 +02:00
option on the command line,
\fB mysqlaccess\fR
prompts for one\& .
2009-09-16 14:03:18 +02:00
.sp
Specifying a password on the command line should be considered insecure\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 5.3.2.2, \(lq End-User Guidelines for Password Security\(rq \& .
2009-09-16 14:03:18 +02:00
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: plan option
. \" plan option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- plan\fR
.sp
2009-09-16 14:03:18 +02:00
Display suggestions and ideas for future releases\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: preview option
. \" preview option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- preview\fR
.sp
2009-09-16 14:03:18 +02:00
Show the privilege differences after making changes to the temporary grant tables\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: relnotes option
. \" relnotes option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- relnotes\fR
.sp
2009-09-16 14:03:18 +02:00
Display the release notes\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: rhost option
. \" rhost option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- rhost=\fR \fB \fI host_name\fR \fR ,
\fB \- H \fR \fB \fI host_name\fR \fR
.sp
2015-09-09 14:32:52 +02:00
Connect to the MariaDB server on the given host\& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: rollback option
. \" rollback option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- rollback\fR
.sp
2009-09-16 14:03:18 +02:00
Undo the most recent changes to the temporary grant tables\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: spassword option
. \" spassword option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- spassword[=\fR \fB \fI password\fR \fR \fB ]\fR ,
\fB \- P[\fR \fB \fI password\fR \fR \fB ]\fR
.sp
2009-09-16 14:03:18 +02:00
The password to use when connecting to the server as the superuser\& . If you omit the
2009-05-25 11:59:47 +02:00
\fI password\fR
value following the
2010-04-28 15:06:11 +02:00
\fB \- \- spassword\fR
2009-05-25 11:59:47 +02:00
or
\fB \- p\fR
2010-04-28 15:06:11 +02:00
option on the command line,
\fB mysqlaccess\fR
prompts for one\& .
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
Specifying a password on the command line should be considered insecure\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 5.3.2.2, \(lq End-User Guidelines for Password Security\(rq \& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: superuser option
. \" superuser option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- superuser=\fR \fB \fI user_name\fR \fR ,
\fB \- U \fR \fB \fI user_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Specify the user name for connecting as the superuser\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: table option
. \" table option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- table\fR ,
\fB \- t\fR
.sp
2009-09-16 14:03:18 +02:00
Generate reports in table format\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: user option
. \" user option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- user=\fR \fB \fI user_name\fR \fR ,
\fB \- u \fR \fB \fI user_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The user name to use in the access privileges\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlaccess: version option
. \" version option: mysqlaccess
2009-05-25 11:59:47 +02:00
\fB \- \- version\fR ,
\fB \- v\fR
.sp
2009-09-16 14:03:18 +02:00
Display version information and exit\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
2015-09-09 14:32:52 +02:00
If your MariaDB distribution is installed in some non\- standard location, you must change the location where
2009-05-25 11:59:47 +02:00
\fB mysqlaccess\fR
expects to find the
\fB mysql\fR
2009-09-16 14:03:18 +02:00
client\& . Edit the
mysqlaccess
script at approximately line 18\& . Search for a line that looks like this:
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
MDEV-23789: Fix unnecessary acute accents in man pages
The man pages has several places where \' is intended to escape the single
quote and just print '. However, in reality this will print an ` (acute
accent). Fix this by removing excess backslashes. Also remove some excess
& in front of dots, such escaping is also unnecessary.
Also join several lines to avoid lone words in quotes to be read by groff
as macros when they are just text.
In a table (t{}) the content must be on new lines separately, so groff
will try to read them as macros too, so use \(aq that renders to '
(single quote).
This error was originally detected by Lintian:
https://lintian.debian.org/tags/acute-accent-in-manual-page
Example of man page sections before and after:
Make a backup of each table´s data file using the name tbl_name.OLD.
->
Make a backup of each table's data file using the name tbl_name.OLD.
A typical debug_options string is ´d:t:o,file_name´.
The default is ´d:t:o,/tmp/my_print_defaults.trace´.
->
A typical debug_options string is 'd:t:o,file_name'.
The default is 'd:t:o,/tmp/my_print_defaults.trace'.
shell> mysql --xml -uroot -e "SHOW VARIABLES LIKE ´version%´"
<?xml version="1.0"?>
<resultset statement="SHOW VARIABLES LIKE ´version%´" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
->
shell> mysql --xml -uroot -e "SHOW VARIABLES LIKE 'version%'"
<?xml version="1.0"?>
<resultset statement="SHOW VARIABLES LIKE 'version%'" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
This command was used to validate no man pages have syntax errors:
for x in *.?
do
echo "##### $x #####"
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $x >/dev/null
done
The man pages are not perfect after this, there are still a lot of
suboptimal syntax, but this helps towards better man pages.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2023-03-11 13:01:39 -08:00
$MYSQL = '/usr/local/bin/mysql'; # path to mysql executable
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
Change the path to reflect the location where
\fB mysql\fR
2009-09-16 14:03:18 +02:00
actually is stored on your system\& . If you do not do this, a
2009-05-25 11:59:47 +02:00
Broken pipe
error will occur when you run
2009-09-16 14:03:18 +02:00
\fB mysqlaccess\fR \& .
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2020-05-15 17:35:47 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2020 MariaDB Foundation
2009-05-25 11:59:47 +02:00
.PP
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.
.PP
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.
.PP
2019-05-11 21:29:06 +03:00
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-1335 USA or see http://www.gnu.org/licenses/.
2009-09-16 14:03:18 +02:00
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
2015-09-09 14:32:52 +02:00
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
2009-05-25 11:59:47 +02:00
.SH AUTHOR
2015-09-09 14:32:52 +02:00
MariaDB Foundation (http://www.mariadb.org/).