Connect dokku MySQL using a database GUI such as Sequel Ace or Sequel Pro
P粉792673958
P粉792673958 2024-03-27 23:38:57
0
1
440

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粉792673958
P粉792673958

reply all(1)
P粉309989673

Figured out.

  1. Expose your mysql database to port dokku mysql:expose <db_name> <port>
  2. Run dokku mysql:info <db_name> Find "Dsn" (DATABASE_URL). It looks like mysql://mysql:@dokku-mysql-staging-db:3306/
  3. This URL contains all the information you need [Database type]://{username}:{password}@{internal docker host name}/{db_name}
  4. Now you can connect remotely to the database GUI

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template