Back

appwrite-maraidb: What is the root password and whats the database-name? Is project important?

  • 0
  • Databases
xpediter
18 Sep, 2023, 09:01

#!/bin/sh CONTAINER=appwrite-mariadb PROJECT=<YOUR PROJECT>

docker exec -it $CONTAINER sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "select permissions, documentSecurity, attributes FROM $1__metadata where _uid = "functions";"' -- $PROJECT

TL;DR
The user is asking for the root password and the database name. They have set the password in the .env file and all SQL queries work, but they need the password for deleting. The user is also asking how to find the mapping of table names with internal table names. Solution: - The root password can be found in the .env file. - The database name can be found by looking into the tables. The table `_console_projects` has all the projects, with the `_id` being the prefix used for the project tables. The table `<prefix>_databases` will give you the databases, with the `_id
Drake
18 Sep, 2023, 16:49

by default, these values are already set in your mariadb container as env vars

xpediter
20 Sep, 2023, 09:09

@Steven THX. how do I find the mapping of my table names with the internal table names?

Drake
20 Sep, 2023, 16:45

you'll have to dig into the tables. for example, _console_projects has all the projects and the _id is the prefix used for the project tables. <prefix>_databases will give you the databases and the _id is the prefix used for the database tables. etc.

xpediter
21 Sep, 2023, 07:56

THX Steven. I got the logic.

xpediter
21 Sep, 2023, 08:08

all SQL queries work but for "delete" a password must be entered. Where can I get the root password?

Joshi
21 Sep, 2023, 09:25

You set the password in the .env file

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