Database Connections
The database connection is defined in ~/admin/includes/config.php. The installer writes this file, but you can edit it afterwards to change credentials, point at a different server, or enable an encrypted connection.
Connection Settings
| Constant | Purpose |
|---|---|
SENDSTUDIO_DATABASE_TYPE | Database engine. mysql. |
SENDSTUDIO_DATABASE_HOST | Hostname or IP of the database server. Append a custom port here (see below). |
SENDSTUDIO_DATABASE_NAME | Database name. |
SENDSTUDIO_DATABASE_USER | Database user. |
SENDSTUDIO_DATABASE_PASS | Password for that user. |
SENDSTUDIO_DATABASE_UTF8PATCH | Character set handling for the connection. |
SENDSTUDIO_DATABASE_SQLMODE | SQL mode applied to the session. |
SENDSTUDIO_DATABASE_DISABLE_FOREIGNKEYCHECKS | Disables foreign key checks. Leave at the installed value unless support advises otherwise. |
SENDSTUDIO_DATABASE_TLS | Set to '1' to encrypt the connection. See Encrypting the Connection. |
SENDSTUDIO_DATABASE_TLS_KEY | Absolute path to the client private key. |
SENDSTUDIO_DATABASE_TLS_CERT | Absolute path to the client certificate. |
SENDSTUDIO_DATABASE_TLS_CA | Absolute path to the CA certificate that validates the server. |
Changing Database Credentials
If you rotate the database password or move to a different database user, edit the matching constants in ~/admin/includes/config.php:
define('SENDSTUDIO_DATABASE_USER', 'interspire_user');define('SENDSTUDIO_DATABASE_PASS', 'new-password-here');No upgrade step or cache clear is required — the next request uses the new details.
Using a Custom Port
There is no separate port constant. Append the port to the host value:
define('SENDSTUDIO_DATABASE_HOST', 'db.example.com:3307');Encrypting the Connection v8.5.2
Interspire Email Marketer can connect to MySQL over TLS/SSL. This matters when the database is on a separate host, since an unencrypted connection carries subscriber data and credentials across the network in the clear.
Enabling TLS requires certificates on both sides: the MySQL server must be configured to accept encrypted connections, and Interspire Email Marketer needs a client key, client certificate, and the CA certificate that validates the server.
Configuring TLS During Installation
On a new installation, check TLS Configuration (Optional) on the MySQL Database Details screen of the installation wizard and enter the full paths to the client key, client certificate, and CA certificate. The installer opens an encrypted connection and writes the constants for you.
Configuring TLS After Installation
On an existing installation, add the constants to ~/admin/includes/config.php:
define('SENDSTUDIO_DATABASE_TLS', '1');define('SENDSTUDIO_DATABASE_TLS_KEY', '/opt/interspire/ssl/client.key');define('SENDSTUDIO_DATABASE_TLS_CERT', '/opt/interspire/ssl/client.crt');define('SENDSTUDIO_DATABASE_TLS_CA', '/etc/mysql/ssl/ca.crt');SENDSTUDIO_DATABASE_TLS must be set to '1'. When it is absent, TLS defaults to off and the other three values are ignored.
Store certificate files outside the web server document root, and make them readable only by the web server user (commonly www-data). Use absolute paths, not relative ones.
Verifying the Connection
Go to Tools > System Information. Two entries near the end of the page report the state of the database connection:
- Database SSL Configured — whether
SENDSTUDIO_DATABASE_TLSis enabled. - Database SSL Active — whether the live connection is actually encrypted. When it is, this also reports the cipher, the protocol version, and whether the certificate is self-signed.
“Configured: Yes” with “Active: No” means the setting is on but the connection is not encrypted — most often the localhost socket issue above.
For server-side setup — generating certificates, editing my.cnf, enforcing REQUIRE SSL per user, and the differences between MySQL, MariaDB, and Amazon RDS — see How to Secure MySQL Connections in Interspire with TLS/SSL.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| System Information shows SSL configured but not active | Host is localhost, so the connection uses a local socket | Change the host to 127.0.0.1 or a resolvable hostname |
| Connection fails after enabling TLS | Certificate files unreadable by the web server user, or relative paths used | Grant read access to the web server user and use absolute paths |
| Connection fails before TLS is configured in the application | REQUIRE SSL was granted on the database user first | Configure TLS in config.php before enforcing the grant, or temporarily remove the requirement |
Application will not load after editing config.php | Malformed constant or missing semicolon | Restore the backup and re-apply the change |