appwrite: SQLSTATE[HY000] [1130] Host '172.19.0.8' is not allowed to connect to this MariaDB server

After freshly setting up appwrite on my local and try to test the sign up functionality. I encountered the error "SQLSTATE[HY000] [1130] Host ‘172.19.0.8’ is not allowed to connect to this MariaDB server. Screenshot below: image

Docker Running

image

Initial checking on MariaDB.

image

Here’s a video on how to recreate the issue. https://www.loom.com/share/98b4c62fc0864d2c81e0a902aa226078

I execute the all.sql and set root password to password but still cant connect. image

UPDATE -> RESOLVED so after executing all.sql and set a root password. all you need to do is to create user with % which means “every IP are allowed”

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'password';
mysql> grant all on *.* to 'root'@'%';

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 23 (14 by maintainers)

Most upvoted comments

@Riyenz are you sure youre in sync with the master branch? I had faced this issue as well. This happens because of permissions. Basically race condition between the different containers. Send us a few more outputs .

  1. run the following
docker-compose down -v
docker volume prune
docker container prune
sudo -rm -r ./storage/
mkdir storage

docker-compose up -d 

In another terminal connect to the mariadb container to get the logs,

docker-compose logs -f appwrite_mariabd_1

Note that, the first set of logs will pop up instantly but the result of the init-d scripts (all.sql) will show up only after 2 - 3 minutes. Send us the complete logs for this container.

  1. send us your dockerfile

@mostafahussein We have seen this issue happening only in a few setups, still waiting for @Riyenz to confirm this has solved his original problem.

This set of commits were attempting to solve a similar (or the same?) issue @christyjacob4 had: https://github.com/appwrite/appwrite/commit/f739f4e763b4afbf887f918b1872856ccc3867a7#diff-3254677a7917c6c01f55212f86c57fbf https://github.com/appwrite/appwrite/commit/b5d4692a85055b0281b9e2eca6f21fe3eab21d07#diff-3254677a7917c6c01f55212f86c57fbf https://github.com/appwrite/appwrite/commit/8fe329168f09518951b1f7acfa4741b68605d2a4#diff-3254677a7917c6c01f55212f86c57fbf

@christyjacob4 has seen that the Appwrite container was changing DB permissions in his setup and by that denying MariaDB from accessing the DB storage.

This was happening constantly in older versions, but I haven’t heard of something similar in the last few months. Closing for now.

@eldadfux I tried running it with a fresh docker-compose setup, having the same issue.

I’ve not set-up any volume paths or whatever beyond what’s explained in the docs.

Is this expected?