Back

[SOLVED] Unable to remotely connect to MariaDB instance

  • 1
  • Databases
sudorm-rf
21 Feb, 2023, 17:28

everything is working fine. tables are created

TL;DR
Issue: Unable to remotely connect to MariaDB instance Solution: The user discovered that the MariaDB instance needs to have the database schema created before Appwrite can connect remotely. The user should create the database manually before setting up Appwrite. Additionally, it was noted that the root password on RDS needs to be set in order for Appwrite to create the appwrite DB correctly. The initialization process of the mariadb container creates the root account, a non-root user, and the specified database as part of its setup. It was suggested to document the need to create the database beforehand and potentially add a page under installation for external databases.
VincentGe
21 Feb, 2023, 17:29

🥳

sudorm-rf
21 Feb, 2023, 17:29

Should I raise a Github issue describing the condition? it needs to be fixed I guess

Drake
21 Feb, 2023, 17:30

yes, when appwrite starts, it checks to see if the tables are there. if not, it'll create them

Drake
21 Feb, 2023, 17:31

we may want to document the need to create the database first. I'm not sure the best way to document that @VincentGe

VincentGe
21 Feb, 2023, 17:31

For external DBs right?

VincentGe
21 Feb, 2023, 17:31

We can add a page under installation tbh 😛

VincentGe
21 Feb, 2023, 17:31

But idk

Drake
21 Feb, 2023, 17:31

oh duh

VincentGe
21 Feb, 2023, 17:31

What is _APP_DB_ROOT_PASS for?

VincentGe
21 Feb, 2023, 17:31

I aassumed this was needed to create the Schema

Drake
21 Feb, 2023, 17:31

when you spin up the mariadb container, it creates the database automatically.

Drake
21 Feb, 2023, 17:32

required by the mariadb container for startup/initialization

sudorm-rf
21 Feb, 2023, 17:32

yes! most important question lol

VincentGe
21 Feb, 2023, 17:32

I seee, I'm guess it's a task we run at start up right?

VincentGe
21 Feb, 2023, 17:33

It deosn't work for external instances

VincentGe
21 Feb, 2023, 17:33

🤔

Drake
21 Feb, 2023, 17:33

yes? as part of it's initialization, it creates the root account with that password, a non-root user, and the database specified

Drake
21 Feb, 2023, 17:36

sorry, we don't run these tasks. the out-of-the-box mariadb image does this

VincentGe
21 Feb, 2023, 17:37

I'm guessing if you set the root password on RDS, Appwrite should be able to create the appwrite DB right?

VincentGe
21 Feb, 2023, 17:37
VincentGe
21 Feb, 2023, 17:37

😑 or smthing else non-standard

VincentGe
21 Feb, 2023, 17:38

[SOLVED] Unable to remotely connect to MariaDB instance

Drake
21 Feb, 2023, 17:38

Appwrite doesn't create the database. it needs to be created beforehand

VincentGe
21 Feb, 2023, 17:40

🤔 Okay so we have to explicitly create the schema I see. Thanks!

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