Managing Databases in MODX Cloud
Remote Database Clients
To create, edit and export records in your Cloud's database, use a remote database management client for Windows, macOS or Linux.
Here are the clients we have tested successfully. Most are free.
Windows
- HeidiSQL—Windows-native and free. Connects to MySQL and MariaDB.
macOS
- Sequel Ace—Mac-only, free and open source (MIT), built for MySQL and MariaDB. Also on the Mac App Store and Homebrew.
Windows, macOS and Linux
- DBeaver Community—free and open source. Installs from a Windows installer, a Mac DMG, or Linux packages (Debian, RPM, Snap, Flatpak).
- Beekeeper Studio Community Edition—a free GPLv3 edition with SSH tunnelling, intended for individuals, students, non-profits and small businesses.
- DbGate Community—free and open source, supports MariaDB, and can also run in a web browser.
The MariaDB documentation lists further graphical tools if none of these suit you.
phpMyAdmin and Other PHP-Based Web Clients
You can technically upload and install your own PHP-based database tool, but we strongly discourage it. Unmaintained database tools are a frequent source of vulnerabilities and a standing target for automated attacks. See Announcing the Removal of phpMyAdmin from the MODX Cloud Dashboard.
Connecting With Your Remote Database Client
From the Clouds page of the MODX Cloud Dashboard, find the Cloud you want to connect to and open its Cloud Edit page.
Scroll to the bottom of that page, to the MySQL and SSH/SFTP Connection Information sections. You will use details from both.
Your database client connects in two stages. First it opens an SSH tunnel to your Cloud, which uses your SSH key. Then it connects to the database through that tunnel, using the MySQL username and password from the Cloud Edit page. Most clients handle the tunnel in the background once both halves are filled in.
Only the SSH half uses a key. Your MySQL password is unchanged and still required—see Change SSH/SFTP and MySQL Passwords if you need to reset it.
Two details catch people out. Databases in MODX Cloud always use 127.0.0.1 rather than localhost as the hostname. And in the SSH portion of the dialog you point the client at your private key file—the file without the .pub extension—rather than entering a password.
If you have not set up an SSH key yet, see Use SSH Keys to Access Clouds. For key file permissions and connection errors, see Access Instances with SFTP & SSH.
Where the key setting lives in each client
HeidiSQL—on the SSH tunnel tab, set the private key file alongside the SSH host and your Cloud's SSH username.
Sequel Ace—choose the SSH tab, enter the SSH host and Cloud SSH username, and select your key under SSH Key.
DBeaver—on the SSH tab of the connection settings, set Authentication Method to Public Key and choose your private key file.
Beekeeper Studio—enable the SSH tunnel, then set Authentication to Key file and browse to your private key.
DbGate—on the SSH Tunnel tab, set the authentication mode to Key file and choose your private key.
Example: HeidiSQL
The images below show the MySQL and SSH/SFTP connection information from the steps above, entered in HeidiSQL.