Create MariaDB database, user, and grants
Create a new database and grant a dedicated user full privileges on it. Run inside sudo mysql -u root -p.
Creates an isolated database and a dedicated user with GRANT permissions limited to that database. Using per-application users limits blast radius if credentials are compromised.
When you need this: When deploying a new application that needs its own database credentials.
Variables
Command
11 views
2 copies
Related in this category
Log in to save
Free account — save snippets into your own collections.