Back

[SOLVED]: I have Setuped a Managed Mariadb. But I can't connect to it?

  • 3
  • Self Hosted
  • Databases
  • Web
ORIZON
16 Apr, 2023, 11:21

I have Setuped a Managed Mariadb. And I changed the APP_DB_xx to the server IP, Username & Pass . But I can't connect to it?

TL;DR
User is having trouble connecting to a Managed Mariadb. They have changed the necessary fields in the .env file and have restarted their docker environment multiple times. They are able to connect to the Mariadb using the normal CLI, but when trying to connect through the app, they receive a "Database not ready" error. The tables in the Mariadb are automatically created. User confirms they are able to ping the Mariadb instance from the appwrite server. Solution: It seems that everything is set up correctly. The user should make sure they are connected to the correct server (Mariadb) when running commands.
ORIZON
16 Apr, 2023, 11:24

I get Database not ready. Retrying connection (4)...

ORIZON
16 Apr, 2023, 11:29

Im using IP of the VPS to Connect

ORIZON
16 Apr, 2023, 11:35

but i can connect to the DB using normal CLI

ORIZON
16 Apr, 2023, 12:04

"MariaDB [appwrite]> MariaDB [appwrite]> SHOW TABLES; +--------------------------+ | Tables_in_appwrite | +--------------------------+ | _console__metadata | | _console__metadata_perms | +--------------------------+"

ORIZON
16 Apr, 2023, 12:04

But these tables are automatically created

ORIZON
16 Apr, 2023, 12:24

Anybody there?

Binyamin
16 Apr, 2023, 12:26

Where you have set the server IP fields

Binyamin
16 Apr, 2023, 12:29

Have you restarted your docker environment after changing those values with docker compose up -d?

ORIZON
16 Apr, 2023, 12:32

In the .env file

ORIZON
16 Apr, 2023, 12:32

Yeah I have restarted Multiple times

ORIZON
16 Apr, 2023, 12:33
ORIZON
16 Apr, 2023, 12:33

These are from MariaDB

ORIZON
16 Apr, 2023, 12:33

They are connected and I see these tables created

ORIZON
16 Apr, 2023, 12:34
Binyamin
16 Apr, 2023, 12:34

Okay. So seems everything intact.

Binyamin
16 Apr, 2023, 12:34

Where you run that?

ORIZON
16 Apr, 2023, 12:35
ORIZON
16 Apr, 2023, 12:35

I have setup a VPS in Vultr with MariaDB installed

ORIZON
16 Apr, 2023, 12:35

I SSHed into the server and ran that command

Binyamin
16 Apr, 2023, 12:36

Into which server The Appwrite Or The MarisDB one?

ORIZON
16 Apr, 2023, 12:36

In the MARIADB

Binyamin
16 Apr, 2023, 12:36

Okay. So first you need to be sure that you're able to ping the db instance from the appwrite

Binyamin
16 Apr, 2023, 12:37

Can you verify that?

ORIZON
16 Apr, 2023, 12:37

Yep. I just Did that. I also used Telnet <MariaDB Ip> <Port>. I connected from Appwrite Container to MariaDB successfully

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more