Managing MariaDB Database Users, Passwords, and Privileges | NodeFlux.eu Docs

Create database users, grant granular table privileges, and manage authentication credentials in SQL.

Steps

  1. Connect to your MariaDB database as administrative user via SQL client or terminal.
  2. Create a restricted user account: CREATE USER "app_user"@"%" IDENTIFIED BY "StrongPassword123!";
  3. Grant specific database privileges: GRANT SELECT, INSERT, UPDATE, DELETE ON myappdb.* TO "app_user"@"%";
  4. Apply privilege updates immediately: FLUSH PRIVILEGES;
  5. Verify user privileges by querying: SHOW GRANTS FOR "app_user"@"%";
  6. Avoid granting ALL PRIVILEGES or GRANT OPTION to application connection accounts.

Notes