Connect to Plexivo MySQL

Connect WordPress, Laravel or any MySQL client to Plexivo MySQL over TLS.

Plexivo MySQL works with the drivers, plugins and tools you already use. Every connection uses TLS, and your database’s own CA certificate lets your client check it is talking to your database.

Connection details#

Open the database and choose the Connect tab:

  • Connection string: choose Reveal to see it and Copy to copy it. Where both are offered, switch between Public · external backends and Private · apps in this project.
  • Connections, TLS, Host (with its port) and User / database.
  • CA certificate downloads plexivo-mysql-ca.pem.
  • Ready-to-paste settings for WordPress, Laravel, Node.js and the Command line.

The user and database are both app. The public host ends in .db.plexivo.app and each database has its own public port, so always use the port shown. Apps in the same project use the private address, on port 3306.

WordPress#

In wp-config.php:

php
define( 'DB_NAME', 'app' );
define( 'DB_USER', 'app' );
define( 'DB_PASSWORD', 'your password' );
define( 'DB_HOST', 'your-host.db.plexivo.app:port' );
define( 'DB_CHARSET', 'utf8mb4' );
define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL );

Copy the exact lines, with your host and password, from the WordPress settings on the Connect tab.

Laravel#

In .env:

bash
DB_CONNECTION=mysql
DB_HOST=your-host.db.plexivo.app
DB_PORT=your port
DB_DATABASE=app
DB_USERNAME=app
DB_PASSWORD=your password
MYSQL_ATTR_SSL_CA=/path/to/plexivo-mysql-ca.pem

Laravel’s standard config/database.php passes MYSQL_ATTR_SSL_CA to the driver, which then connects over TLS with your database’s certificate.

Node.js#

js
import mysql from 'mysql2/promise';
import { readFileSync } from 'node:fs';

const pool = mysql.createPool({
  uri: process.env.MYSQL_URL,
  connectionLimit: 10,
  ssl: { ca: readFileSync('plexivo-mysql-ca.pem'), rejectUnauthorized: true }
});

Apps you connect in Plexivo receive MYSQL_URL (see Connected apps); anywhere else, set it to the connection string from the Connect tab.

From your laptop#

With the mysql client, over the public address:

bash
mysql -h your-host.db.plexivo.app -P port -u app -p --ssl-mode=VERIFY_IDENTITY --ssl-ca=plexivo-mysql-ca.pem app

Or through the Plexivo CLI, which works even when the database is private or limited to trusted networks:

bash
plexivo db connect shop-db

It listens on 127.0.0.1:3306, or a free port if that one is taken, and prints the connection string to use. Keep it running and connect MySQL Workbench, TablePlus or the mysql client to it. See Install the Plexivo CLI.

Connected apps#

When you connect a Plexivo App Runner app or a Plexivo Kubernetes workload to the database in Plexivo, it receives MYSQL_URL and MYSQL_CA_CERT as environment variables.

Connection limits#

Each size has a fixed number of connections, shown as Connections on the Connect tab. Size your app’s pool below it: each PHP-FPM worker, queue worker and scheduled job holds a connection. See Sizes and connection limits.

Rotate the password#

If the connection string was shared or leaked, choose Rotate password on the Connect tab. The old password stops working, open connections keep running, and apps you connected in Plexivo receive the new one. See Rotate the database password.

For businesses Limit a public database to your servers’ outbound IP addresses, or make it private, on the Network tab. See Network access; it works the same way for Plexivo MySQL.

Next steps#

Updated 27 October 2026