Yesterday, I installed and set up Pterodactyl and created several servers. Since I already had configured servers beforehand, I deleted all the files in the created servers and replaced them with my existing ones. I also created new databases and updated the configurations (directly in the database table) to use the existing ones.
The issue I am facing is that neither the proxy (Velocity) nor the Paper servers can access the databases. For each plugin that tries to connect, I receive the following error:
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Here is an example of my configuration for database access:
address: localhost:3306
database: removed
username: removed
password: 'removed'
What I have tried so far:
- Verified that the database credentials (username, password, database name) are correct by successfully connecting to the database using the mariadb command from the terminal on the host machine.
- Command used: mysql -u <username> -p -h 127.0.0.1 -P 3306
- Tested different values for address, including:
- localhost
- 127.0.0.1
- The server's public IP address
- host.docker.internal
- Updated the MariaDB configuration to allow connections from any IP address by setting bind-address = 0.0.0.0 in /etc/mysql/mariadb.conf.d/50-server.cnf and restarted the MariaDB service.
- Verified the firewall configuration:
- Ensured the firewall was initially disabled and later explicitly allowed traffic from the Docker subnet (172.17.0.0/16) to port 3306.
Despite these efforts, the issue remains unresolved. Any guidance or suggestions would be greatly appreciated.