I had installed docker and configured appsmith container(latest) and mysql container(mysql 8.0.29) in my local machine Ubuntu 20.04 OS. But I couldn’t connect to mysql database from appsmith application. Following is the status shown in appsmith app.
“Appsmith server timed out when fetching structure. Please reach out to appsmith customer support to resolve this.” under DATA SOURCE in appsmith side menu.
Connection to mysql docker from local host is working fine.
mysql docker ip: 172.17.0.2, port 3306
$sudo docker exec -it mysql_docker bash
@pranav
Hi thanks to reply.
When run this command-- $ip addr show docker0 , following is output
+++++++++++++++++++++++++++++++++++++
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:d9:7f:b3:3b brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:d9ff:fe7f:b33b/64 scope link
valid_lft forever preferred_lft forever
++++++++++++++++++++++++++++++++++++++
When run this command …$sudo docker inspect mysql_docker, following is output
J���
8.0.29����Mc!dwa�ےےے�ےك����������aBeT=4=�caching_sha2_password�!��ے„#08S01Got packets out of order
++++++++
appsith is running in 172.17.0.1
But couldn’t connect to mysql from appsmith ->add datasource interface.
@sharat87
When use db name instead of host address and trying to connect data source, showing error that “Unknown host exception Failed to resolve {db name}:3306”
In data source page of appsmith, there is a provision top enter following details. I tried both conditions
Connection Mode *: Read/Write
Host Address: (db name given)
Port: 3306
Database name: (db name given)
Connection Mode *: Read/Write
Host Address: 172.17.0.2
Port: 3306
Database name: (db name given)
(mysql docker is running in 172.17.0.2)
@sharat87
when use ‘db’ instead of host address, showing following alert message is browser.
java.net.UnknownHostException: Failed to resolve ‘db’ after 2 queries