Dear all,
this one drove me nuts for a bit so writing this here for everyone, but especially for me ![]()
I was getting the DK0066 error like many experienced.
1- First issue was a normal site creation in DevKinsta. I fixed this by following this thread: Something bad happened: in create new site - #17 by StormChild
2- I then faced a similar issue when importing a site from Kinsta. I was getting an error and when looking into the main.log file I saw the error
[error] Error - DK0066: IMPORT_DB_DUMP: Error (1): YERROR 1130 (HY000): Host ‘172.172.0.5’ is not allowed to connect to this MariaDB server
I solved this one as follows:
The error “Host ‘172.172.0.5’ is not allowed to connect to this MariaDB server” indicates a MySQL/MariaDB privilege issue where the specified host (likely the web server or FPM container in DevKinsta’s Docker network) does not have the necessary permissions to connect to the database server
To fix this, you need to grant the correct privileges to the database user. The best approach involves accessing the database container via the command line and updating the user permissions.
Solution Steps
-
Access the Database Container:
Open your terminal or command prompt and run the following command to get a bash shell inside your DevKinsta database container:bash
docker exec -it devkinsta_db bash
If your container name is different, adjust
devkinsta_dbaccordingly. -
Log in to MariaDB:
Once inside the container, log in to the MariaDB server using the root user. When prompted for a password, use the database password found in the DevKinsta UI for that site.bash
mysql -u root -p
-
Grant Remote Access Privileges:
Inside the MySQL shell, you need to grant privileges to your user, allowing connections from any host (represented by%). Replace'your_database_password'with the actual password from DevKinsta.sql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your_database_password' WITH GRANT OPTION; FLUSH PRIVILEGES;This command allows the
rootuser to connect from any host (%) to all databases and tables (*.*).Alternatively, for better security, you could specify the exact IP address172.172.0.5instead of%:sql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.172.0.5' IDENTIFIED BY 'your_database_password' WITH GRANT OPTION; FLUSH PRIVILEGES; -
Exit MySQL and Restart the Container:
Typeexit;to leave the MySQL shell, and then typeexitagain to leave the Docker container’s bash session.Restart yourdevkinsta_dbcontainer using your Docker desktop application or the command line for the changes to take effect. -
Retry the Import:
Go back to DevKinsta and try the database import again. The error should now be resolved.