How to get a password from database?

Hello! When I’m install Discourse (Docker) I don’t view what password set from my database.
I need it because I want use remote connect to database and I think Discourse set one password for all dockers image.

1 Like

Hi moschino :wave:,

I don’t know much about technical stuff, but I think when you’re inside the container you can connect to the database using the username discourse without any password.

Let me know if that helps:

./launcher enter app
su - discourse
1 Like

Why do you want to do that? Usually the data explorer is a better way to do that.

By default the database isn’t exposed to a port.

If you really want to expose your database to the world, reinstall with a two container setup (discourse-setup --two-container). If easiest to do it on a new server but topics exist for how to change over.

It’s almost certainly a bad idea. Use data explorer or the API.


So what’s the good content of config/database.yml? Please, can you share a production example?

I don’t see a database listed there and Ruby is failing at some tasks (like export override_translations). I suspect that my installation has something broken.

Currently I only see dev and test database on config/database.yml and I want to actually fix it to the current database working schema :slight_smile:

I can read production db within pslq on containerized Discourse instance.

How did you install discourse?

What problem are you trying to solve?

What is the evidence that something is wrong?

You might see what a

rake db:migrate

Will do?

The database name is in an environment variable.

1 Like

I can’t export es_XX custom language and I suspect that could be related to wrong configuration but then I see that production password and host seems to be not declared on yml files.

I tried to play with LANG and DISCOURSE_DEFAULT_LOCALE but it shouldn’t enough.

Currently I have LANG = en_US.UTF-8 and DISCOURSE_DEFAULT_LOCALE = es (and that allows me to fix trust_level on custom-locale issue as workaround).

I guess this isn’t a standard install.

Yes it is but I think I mixed development with production or something.

Maybe I have problems with emojis on custom locale strings, I will check this out.