Managing MariaDB Database Users, Passwords, and Privileges | NodeFlux.eu Docs
Create database users, grant granular table privileges, and manage authentication credentials in SQL.
Steps
- Connect to your MariaDB database as administrative user via SQL client or terminal.
- Create a restricted user account: CREATE USER "app_user"@"%" IDENTIFIED BY "StrongPassword123!";
- Grant specific database privileges: GRANT SELECT, INSERT, UPDATE, DELETE ON myappdb.* TO "app_user"@"%";
- Apply privilege updates immediately: FLUSH PRIVILEGES;
- Verify user privileges by querying: SHOW GRANTS FOR "app_user"@"%";
- Avoid granting ALL PRIVILEGES or GRANT OPTION to application connection accounts.
Notes
- Restricting user privileges limits potential security impact if application database credentials are compromised.
- Wildcard host "%" allows connecting from any container IP within the NodeFlux infrastructure.
Related NodeFlux pages
- Database Backups and Restores with mysqldump and SQL Scripts — Export database snapshots using mysqldump and restore SQL backup scripts to your MariaDB service.
- SQL Table Indexing and Query Performance Optimization — Improve SQL query execution speeds by building column indexes and analyzing slow queries.
- Connecting DBeaver, HeidiSQL, and External Clients to MariaDB — Connect external database management clients securely to your NodeFlux MariaDB instance.