External MySQL
-
@Trankery The mysql that is allocated to apps is run as a separate container (named
mysql) and is not accessible from the outside directly. Instead, what you can do is to use the CLI tool to access it - https://cloudron.io/documentation/custom-apps/addons/#mysqlMay I ask why you want to access it from outside? I can probably give a better solution depending on the use case. But if you want to access from your laptop/PC:
-
Install the CLI tool - https://cloudron.io/documentation/custom-apps/cli/
-
cloudron exec# mysql --user=${CLOUDRON_MYSQL_USERNAME} --password=${CLOUDRON_MYSQL_PASSWORD} --host=${CLOUDRON_MYSQL_HOST} ${CLOUDRON_MYSQL_DATABASE} mysql> this is the mysql shell
-
-
There is no easy way to make the internal mysql server public without changing the code and I don't know what that will break.
I think you can setup a ssh tunnel between your minecraft server and the Cloudron.
Something like https://www.linode.com/docs/databases/mysql/create-an-ssh-tunnel-for-mysql-remote-access/
Do this on Cloudron:
docker inspect mysql | grep IPAddress "IPAddress": "172.18.0.4",So,
172.18.0.4is the IP of mysql server. Then, you can get the db credentials using the web terminal of the LAMP app:env | grep CLOUDRON_MYSQL_You can then connect using the above credentials as:
mysql --host=172.18.0.4 --user=<username> --password=<password> <db>After the above works, you just setup SSH tunnel accordingly.
-
There is no easy way to make the internal mysql server public without changing the code and I don't know what that will break.
I think you can setup a ssh tunnel between your minecraft server and the Cloudron.
Something like https://www.linode.com/docs/databases/mysql/create-an-ssh-tunnel-for-mysql-remote-access/
Do this on Cloudron:
docker inspect mysql | grep IPAddress "IPAddress": "172.18.0.4",So,
172.18.0.4is the IP of mysql server. Then, you can get the db credentials using the web terminal of the LAMP app:env | grep CLOUDRON_MYSQL_You can then connect using the above credentials as:
mysql --host=172.18.0.4 --user=<username> --password=<password> <db>After the above works, you just setup SSH tunnel accordingly.
-
N nebulon marked this topic as a question on
-
N nebulon has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login