MySQL: Difference between revisions
No edit summary |
|||
Line 9: | Line 9: | ||
* <code>WITH GRANT OPTION</code> lets the user grant permissions to other users. | * <code>WITH GRANT OPTION</code> lets the user grant permissions to other users. | ||
==Docker== | |||
I suggest using the [https://hub.docker.com/_/mariadb docker mariadb container].<br> | |||
It is also available on [https://gallery.ecr.aws/docker/library/mariadb AWS ECR]. | |||
===Upgrades=== | |||
To upgrade the container, set the environment variable <code>MARIADB_AUTO_UPGRADE=1</code> and bump the version number.<br> |
Revision as of 18:21, 14 December 2022
This page is primarily on the usage of MySQL and MariaDB. In cases where these differ, details are on MariaDB.
Usage
Users
CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost' WITH GRANT OPTION;
WITH GRANT OPTION
lets the user grant permissions to other users.
Docker
I suggest using the docker mariadb container.
It is also available on AWS ECR.
Upgrades
To upgrade the container, set the environment variable MARIADB_AUTO_UPGRADE=1
and bump the version number.