# Problems With Plugins Accessing Databases

<span style="color: #000000;">If you get an error like the below with your plugins connecting to databases:</span>

<p class="callout info"><span style="color: #000000;">Remember, all plugins display errors in different ways, such as LuckPerms below, but will fill the console with a few lines of errors to tell you it failed to link to the SQL database if you configured the plugin to use one.</span></p>

<span style="color: #000000;">![](https://jasmeow.pics/gnL29a.png)</span>

<span style="color: rgb(0, 0, 0);">Unfortunately, this is mostly always due to you entering the wrong endpoint IP address into the configuration file of said plugin. It can also be username and password being incorrect but it is normally the port not being open to the database host, either configured internally or not open on another system.</span>

<span style="color: #000000;">For your databases to work correctly, ensure that the plugins host/IP address is pointing to “**172.18.0.1**” in its config.yml file. The configuration file might be named differently for your plugin, but the action is the same. Make sure it is not “**localhost**” or “**127.0.0.1**” as it shows in the database creation panel, shown below. </span>

<span style="color: #000000;">All your servers sit in individual *houses* called docker containers, separated from each other. They cannot see outside themselves to the main internal system, root level. Docker, the system which makes these *houses* creates a private network adapter with the IP address “**172.18.0.1”** to all containers internally, so they all link together and know how to interact with one another. This makes them speak on this number to access the databases living on “**127.0.0.1**”. Think of it as a bridge linking two cities together.</span>

<span style="color: #000000;">Make sure not to make this mistake when creating databases in the panel and getting errors such as “Connection timed out”, "Communications link failure" and "timeout after 10000ms" in the console.</span>

<span style="color: #000000;">![image-1629134683719.png](https://docs.jasmeowthecat.lgbt/uploads/images/gallery/2021-08/scaled-1680-/pVSgzfGa3xjEJIH0-image-1629134683719.png)</span>

<span style="color: #000000;">![image-1629134321122.png](https://docs.jasmeowthecat.lgbt/uploads/images/gallery/2021-08/scaled-1680-/2YNMKKtGVnetVa73-image-1629134321122.png)</span>

<span style="color: #000000;">Another most common reason for plugins not accessing databases on the panel is because your systems are running UFW, which is unified firewall. At Jasmeow.Systems, we configure this appropriately with additional rules for security purposes but if 3306 is not allowed internally on your own system, the following rules can be added:</span>

```bash
# Allows Votifier Ports
ufw allow in on pterodactyl0 to 172.18.0.1 port 40001:40010 proto tcp
# Allows MC Ports
ufw allow in on pterodactyl0 to 172.18.0.1 port 25566:25580 proto tcp
# Allows Redis
ufw allow in on pterodactyl0 to 172.18.0.1 port 6379 proto tcp
# Allows MongoDB
ufw allow in on pterodactyl0 to 172.18.0.1 port 27017 proto tcp
# Allows MySQL
ufw allow in on pterodactyl0 to 172.18.0.1 port 3306 proto tcp
```

<span style="color: rgb(0, 0, 0);">Any questions, reach out to management.</span>