I installed dokku with MySQL. I'm trying to figure out how to connect a MySQL database in dokku to a database GUI like Sequel ace or Sequel pro.
I have created a database and linked it to my (Laravel) application and it works great! But I don't know which username/password/host I need to fill in in sequel ace to connect to the database inside dokku.
Does anyone have experience in this area?
Thanks in advance!
P粉3099896732024-03-28 14:32:00
Figured out.
dokku mysql:expose <db_name> <port>
dokku mysql:info <db_name>
Find "Dsn" (DATABASE_URL). It looks like mysql://mysql:[Database type]://{username}:{password}@{internal docker host name}/{db_name}
I successfully connected using Sequel Pro and the following information was displayed:
Host: { your servers IP address } Username: { username from DB URL } Password: { password from DB URL } Port: { port you exposed the DB on }
PS: I read somewhere that you need to disable UFW on the server, but I'm not in server administration so I don't know the consequences of that.