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

OptionDescription
--helpDisplay a help message and exit.
--host=host_nameConnect to the MariaDB server on the given host.
--password=passwordThe 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_numThe TCP/IP port number to use for the connection.
--socket=pathFor connections to localhost, the Unix socket file to use.
--user=user_nameThe MariaDB user name to use when connecting to the server.

Comments

Comments loading...