MySQL connection errors
Communications link failure, Access denied, Too many connections: analysis of common database errors and what to check.
Diperbarui 13 Agustus 2026
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
java.sql.SQLException: Access denied for user
java.sql.SQLException: Too many connections
Diagnosis
| Error | Cause |
|---|---|
Communications link failure | Database unavailable: wrong host/port, database is off, network |
Access denied | Wrong login or password, or access from this address is denied |
Unknown database | The database name is wrong |
Too many connections | Connection limit reached: plugins are using a pool that is too large |
Table doesn't exist | The plugin didn't create its tables: check the database user's permissions |
What to check
- The credentials from the control panel were copied in full — MySQL database.
- Are you connecting from ANOTHER one of your own servers? Then you need two things: the “Shared database for my servers” checkbox enabled and the port from the “Connecting from your other servers” block — the other machine reaches the database on a different port.
Access denied for user ... @'172.18.0.1'is almost always this. - The port is specified separately from the host.
- The password has no trailing space.
- The plugin starts after the database becomes available: an unavailable database stalls startup — Server takes a long time to start.
Too many connections
Every plugin keeps a connection pool. Five plugins with 10 connections each is already 50. Reduce the pool size in the configs:
pool-settings:
maximum-pool-size: 5
minimum-idle: 2
For a plugin that hits the database once a minute, a pool of ten connections is pointless — MySQL for plugins.
Hosting MinecraftServer Anda berjalan saat Anda offlineBuat server
