MariaDB starting with 10.4.6

From MariaDB 10.4.6, mariadb-setpermission is a symlink to mysql_setpermission.

MariaDB starting with 10.5.2

From MariaDB 10.5.2, mysql_setpermission is the symlink, and mariadb-setpermission the binary name.


mysql_setpermission [options]


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:


--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 loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.