You get this error?:
[script:mysql-async] [mysql-async] [ERROR] connect ECONNREFUSED 127.0.0.1:3306
I finally figured it out: namely when you use Pterodactyl and use “localhost” or “127.0.0.1”, you call the container itself.
Very simple fix:
enter the following command in your SSH console:
ip addr | grep docker0
Then you should get something like this:
docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOW
N group default
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
and exactly this IP address 172.17.0.1 you use as your MySQL server. If you still get an error you should bind your MySql server to get the connections from outside, this you do as follows:
1. find /etc -iname my.cnf
2. nano /etc/mysql/my.cnf
3. at the bottom add this
[mysqld]
bind-address=0.0.0.0
now you are ready and your FiveM server connects to the database!