mysql_setpermission
From MariaDB 10.4.6, mariadb-setpermission
is a symlink to mysql_setpermission
.
From MariaDB 10.5.2, mysql_setpermission
is the symlink, and mariadb-setpermission
the binary name.
Syntax
mysql_setpermission [options]
Description
mysql_setpermission is a Perl script that was originally written and contributed by Luuk de Boer. It requires the DBI and DBD::mysql Perl modules to be installed. mysql_setpermission can help you add users or databases or change passwords in MariaDB.
It interactively sets permissions in the MariaDB grant tables, but does not check permissions which have already been set in MariaDB. So if you can't connect to MariaDB using the permission you just added, take a look at the permissions which have already been set in MariaDB.
The account used when you connect determines which permissions you have when attempting to modify existing permissions in the grant tables.
mysql_setpermission also reads options from the [client] and [perl] groups in the .my.cnf file in your home directory, if the file exists.
The following options are available:
Options
Option | Description |
---|
--help |
Display a help message and exit. |
--host=host_name |
Connect to the MariaDB server on the given host. |
--password=password |
The password to use when connecting to the server. Note that the password value is not optional for this option, unlike for other MariaDB programs Specifying a password on the command line should be considered insecure. You can use an option file to avoid giving the password on the command line. |
--port=port_num |
The TCP/IP port number to use for the connection. |
--socket=path |
For connections to localhost, the Unix socket file to use. |
--user=user_name |
The MariaDB user name to use when connecting to the server. |
© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/mysql_setpermission/