Browse docs
Cloud docs
Connecting to MySQL on Layerbase Cloud
MySQL databases expose the native MySQL protocol, so common CLIs, ORMs, and migration tools connect without a Layerbase-specific driver.
Best for: WordPress-style apps, Rails/Laravel workloads, existing MySQL schemas, and services that need broad MySQL client compatibility.
Open your database in the dashboard
Go to /cloud, click the database you just created, and the connection panel shows the host, port, username, password, and a ready-to-paste connection string for the engine.
Copy the host, allocated port, username, password, and database name from the dashboard.
TLS is required, on by default
Enable TLS in your client, usually with --ssl-mode=REQUIRED or ssl: true.
MySQL wire protocol on the allocated TLS port
Use any standard client
MySQL works with the normal client family for that engine. Start with the dashboard snippet, then move the same URL and credentials into your app environment.
If your client has separate direct, pooled, TLS, or HTTP options, prefer the exact variant shown in Quick Connect.
mysql --ssl-mode=REQUIRED -h your-host.cloud.layerbase.dev -P 3306 -u layerbase -p appMySQL notes
- Some clients require the certificate mode to be set explicitly before they will negotiate TLS.
- Use the dashboard value for the port if it differs from the standard MySQL port.