Connecting MySQL on EC2 from Airbyte on another EC...
# replication-troubleshooting
b
Connecting MySQL on EC2 from Airbyte on another EC2 instance installed using abctl in different VPC. Not able to create source but same thing when trying to connect from Airbyte Cloud it's getting successfully connected using allowPublicKeyRetrieval=true&useSSL=false. I have added IP address of Airbyte EC2 in security group of MySQL EC2 and using Public IP + Security Group way to connect over internet. Can someone please help me. I know it may be very simple issue PS: I'm very new to airbyte and to docker or kubernetes or K8 I'm just trying to explore the tool
k
Based on the information in the knowledge sources, here are some key points and troubleshooting steps for connecting a MySQL instance on one EC2 (in VPC A) from Airbyte running on another EC2 (in VPC B), both on AWS, with Airbyte installed using `abctl`: ### 1. Network Access and Security Groups - You have already added the Airbyte EC2's public IP to the MySQL EC2's security group, which is correct. - Ensure that the MySQL server is listening on the public interface and the correct port (default: 3306). - Double-check that the security group allows inbound traffic on the MySQL port from the Airbyte EC2's public IP. - If you are using the public IP, make sure the MySQL server's bind-address is set to
0.0.0.0
or the public IP, not just
localhost
. ### 2. JDBC Parameters - You mentioned that connecting from Airbyte Cloud works with
allowPublicKeyRetrieval=true&useSSL=false
. - When configuring the MySQL source in Airbyte Open Source, you can add these parameters in the JDBC URL Parameters field. - Example:
Copy code
allowPublicKeyRetrieval=true&useSSL=false
- This is a common requirement for MySQL 8+ when using password authentication and not using SSL. ### 3. Common Connection Issues - If you see errors like
HikariPool-1 - Connection is not available, request timed out
, it often means a network or authentication issue, or the MySQL server is not reachable from the Airbyte instance. - For Amazon RDS or EC2-hosted MySQL, ensure the VPC/subnet/network ACLs allow traffic between the two instances. Sometimes, even with security groups set, VPC routing or NACLs can block traffic. - If you are using Docker (as
abctl
does), ensure Docker networking is not interfering. By default, containers use the host network, but if you have custom Docker networking, it could cause issues. ### 4. MySQL Version Compatibility - Airbyte supports MySQL versions 8.4, 8.0, 5.7, or 5.6. Make sure your MySQL version is compatible with Airbyte's MySQL connector requirements [see here](https://docs.airbyte.com/integrations/sources/mysql/mysql-troubleshooting). ### 5. Additional Troubleshooting - If you are able to connect from Airbyte Cloud but not from your self-managed Airbyte, the issue is almost always network-related (firewall, security group, VPC routing, or Docker networking). - Try connecting to the MySQL server from the Airbyte EC2 instance directly using the MySQL CLI with the same credentials and host/port. This will help isolate whether the issue is with Airbyte or with network access. - If you are using SSH tunneling, ensure you are using an RSA private key (not OpenSSH format) as Airbyte does not support OpenSSH keys for SSH tunnels [see here](https://discuss.airbyte.io/t/2084). ### 6. Example MySQL Source Configuration in Airbyte When setting up the MySQL source in Airbyte, fill in: - Host: Public IP of MySQL EC2 - Port: 3306 (or your custom port) - Username/Password: As configured on MySQL - Database: Your database name - JDBC URL Parameters:
allowPublicKeyRetrieval=true&useSSL=false
### 7. abctl and Docker - The
abctl
tool installs Airbyte using Docker. Make sure Docker is running and that the Airbyte containers have network access to the MySQL EC2 instance. [See deployment steps](https://docs.airbyte.com/platform/deploying-airbyte/abctl-ec2). --- If you have followed all the above and still cannot connect, the knowledge sources suggest the issue is likely with network access or Docker networking. There is no explicit mention of additional configuration needed in Airbyte itself beyond what is described above. If you encounter a "Bad handshake" error, some users have reported that downgrading the MySQL server version (e.g., to 5.7 or 5.6) may help, as there have been compatibility issues with some MySQL 8.0.x versions and Airbyte's connector in the past [see here](https://discuss.airbyte.io/t/3099). If you need more detailed help, please provide the exact error message you see in Airbyte when the connection fails. --- Summary: - Double-check network access, security groups, and MySQL bind-address. - Use the same JDBC parameters as with Airbyte Cloud. - Test connectivity from the Airbyte EC2 host directly. - Ensure Docker networking is not blocking outbound connections. - If you see "Bad handshake," consider MySQL version compatibility. Let me know if you need help with a specific error message or log!
b
Tried using MySQL CLI from airbyte ec2 it's working fine. And did some r&d and found that some unautherized issue is coming in airbyte and had to check env variables and all
some secret and all is not proper i think i also set some API_AUTHIROSED to false as well
but still getting same issue