Skip to content

Help

MySQL and MariaDB errors and how to fix them

Tested with:Databasezy API v1 · zb CLI 0.1

MySQL and MariaDB are both available on every plan, including Free. Both speak the MySQL protocol and use the same gateway, so they share most errors. The gateway answers in MySQL’s own format, with a MySQL error number. Each instance has one user, app, with every privilege on the app database and none outside it.

ERROR 3159 (HY000): Connections using insecure transport are prohibited ...

Section titled “ERROR 3159 (HY000): Connections using insecure transport are prohibited ...”

Cause: the client did not ask for TLS. The gateway refuses every plaintext MySQL connection.

Fix: use --ssl-mode=VERIFY_IDENTITY (or your driver’s equivalent) and pass the CA bundle if your driver does not use the system trust store. For the mariadb client, use --ssl-verify-server-cert. See Connect to MySQL.

The mysql command-line client fails with a TLS or connection error

Section titled “The mysql command-line client fails with a TLS or connection error”

Cause: the gateway picks your instance from the TLS server name (SNI). The mysql 8.x command-line client does not send one by default. Drivers and the mariadb client do.

Fix: add --tls-sni-servername=<host> with the same host as --host, as shown in the MySQL FAQ.

The connection closes during the TLS handshake

Section titled “The connection closes during the TLS handshake”

Cause: in these cases the gateway closes the connection with no MySQL error, so you only see a TLS or “lost connection” error:

  • your address is not on the instance’s allow-list
  • you connected by IP address instead of the host name
  • your address is temporarily blocked: by default, 10 failed logins from one address within a minute block it for 10 minutes

Fix: add your egress CIDR under Network → IP allow-list, and always connect to the host from the Connect tab. See IP allow-lists and TLS errors.

ERROR 1045 (28000): Access denied for user 'app'@...

Section titled “ERROR 1045 (28000): Access denied for user 'app'@...”

Cause: wrong password, or a rotation finished.

  • MySQL: after a rotation, the old password keeps working for 10 minutes and then stops.
  • MariaDB: there is no overlap. The old password is rejected as soon as the new one is applied.

Fix: reveal the current password (zb instances credentials reveal <instance_id>) and update your secret store. See Rotating credentials.

ERROR 1044 or 1227: access denied to another database, or for CREATE USER

Section titled “ERROR 1044 or 1227: access denied to another database, or for CREATE USER”

Cause: app has rights on the app database only. It cannot create other databases or users, and SUPER is not granted.

Fix: keep your tables in app. Extra database users are not available.

ERROR 1040 (08004): too many connections for this instance

Section titled “ERROR 1040 (08004): too many connections for this instance”

Cause: the instance already has as many connections as its size allows, so the gateway refuses the extra ones. The same error number with connection rate limit exceeded; slow down means clients opened more than 50 new connections in one second.

Fix: MySQL and MariaDB have no transaction pooler on Databasezy. Use your driver’s pool, keep it small on serverless platforms (2 to 5 connections), and leave about 10 connections free for backups. Or resize. See Too many connections.

ERROR 3032 (HY000): paused, waking up, or suspended

Section titled “ERROR 3032 (HY000): paused, waking up, or suspended”

The text tells you which one it is:

  • paused: the instance is paused by its owner; resume it in the portal or with `zb instances resume`. Someone paused the instance; connections never wake it. Run zb instances resume <instance_id>.
  • paused: the instance was paused by Databasezy support; contact support to resume it. Only support can resume it.
  • the instance is waking up; retry in a few seconds. A paused instance did not wake within the gateway’s 30-second hold. Retry, and give the driver a connect timeout of at least 30 seconds.
  • suspended: ... (or error 1226 with quota_exceeded: ...). See Spending caps and quota errors.

More on pausing: Paused and waking instances.

Query stopped after 60 seconds on the Free plan

Section titled “Query stopped after 60 seconds on the Free plan”

Cause: Free instances limit how long statements may run:

  • MySQL: max_execution_time is 60 seconds for SELECT. The error is 3024: Query execution was interrupted, maximum statement execution time exceeded.
  • MariaDB: max_statement_time is 60 seconds. The error is 1969.

Paid plans do not set these limits.

Fix: tune the query or upgrade. See Slow queries and resources.

MySQL server has gone away or Lost connection on an idle pooled connection

Section titled “MySQL server has gone away or Lost connection on an idle pooled connection”

Cause: the server closed an idle session. You may also see this after a pause or a restart.

Fix: turn on validation on borrow in your pool, or set a maximum idle time, so the pool replaces dead connections.

Got a packet bigger than 'max_allowed_packet' bytes

Section titled “Got a packet bigger than 'max_allowed_packet' bytes”

Cause: a single statement or row exceeds the instance’s current max_allowed_packet parameter.

Fix: split bulk inserts into batches, store large files in object storage, or change the setting on Parameters within the instance size’s bound. Parameter changes restart the database.

Cause: with high availability, the -ro host reads from replicas, which refuse writes.

Fix: send writes to the main host.

Both engines support point-in-time recovery on single-node instances with an active plan or add-on recovery window. They replay archived binary logs on top of a completed dump; high-availability instances do not offer PITR. Check Backups → Point-in-time recovery or zb backups pitr-window <instance_id> for the available range. See Point-in-time recovery. Without a window, restore a scheduled or manual backup.

Search the help center or ask the assistant in the portal Help panel. If that does not solve it, open a support ticket from the portal (Help → Open a ticket) and include:

  • the instance id, engine (MySQL or MariaDB) and region
  • the exact error number and text
  • your client or driver and its version
  • your ssl-mode
  • the time of the failure in UTC

Never paste passwords, connection strings with passwords, API keys or patient data (PHI) into a ticket. See How to get help.