Directus: Connecting Directus to a MySQL or MariaDB database
This documentation is part of the External databases guide. You can view the complete guide here: How to connect Directus to a MySQL, MariaDB, or PostgreSQL database.
👋 Welcome to the Stackhero documentation!
Stackhero offers a Directus cloud service, ready to use in production, in just 2 minutes:
- Unlimited collections, items, users, roles, API requests, and transfers
- Customisable domain name secured with HTTPS (for example, https://cms.your-company.com)
- Dedicated and unlimited email server included
- Redis cache server included for high performance
- Optimal performance and robust security powered by a private and dedicated VM.
- One-click updates for effortless maintenance
Save time and simplify your life: it only takes 5 minutes to try Stackhero's Directus cloud solution!
-
First, create a user for Directus on MySQL or MariaDB. Open phpMyAdmin and navigate to User accounts followed by Add user account.
-
Provide a username (for example,
directus). Set a secure password by clicking the Generate button, choose Native MySQL authentication, and check Create database with same name and grant all privileges.
Directus user creation on a MySQL/MariaDB database -
Next, log in to your Stackhero dashboard. Select your Directus service and click Configure.
-
In the configuration panel under Database, choose MySQL/MariaDB and complete the remaining fields as shown in the screenshot below.
Configuration of MySQL/MariaDB for Directus