Practical examples and tips for working with the database module.
The database module is powerful but requires responsible handling. Here you will find examples of common tasks and how to solve them safely.
Instead of searching individually in the DB editor, you can use the SQL console. Example (ESX):
UPDATE users SET bank = bank + 50000 WHERE identifier = 'steam:110000123456789';
Note: We recommend using the Live Actions in the player profile for such actions, as they automatically create a clean audit entry with a reason.
Use the filter bar above the table to find players with a high account balance.
bank>1000000Before installing a new ingame script that changes the database (e.g., a new garage system):
Cause: Incorrect username or password. Solution: Check your credentials in the Z-UCP settings. Make sure the SQL user has allowed the IP of our API server (whitelisting).
Cause: Your database server closes inactive connections too quickly. Solution: This is usually not critical. Z-UCP automatically restores the connection at the next action.
Security Tip: Create a dedicated SQL user for Z-UCP that only has access to the necessary tables. Never give this user GRANT ALL PRIVILEGES on system tables (mysql, information_schema).