Failed to connect with mysql using google data fusion

◇◆丶佛笑我妖孽 提交于 2020-06-27 13:57:25

问题


I failed to connect to MySQL from google data fusion

the step:

  1. First, I add the connector https://dev.mysql.com/downloads/file/?id=462850

  2. Second, I try to add a connection (failed)

screenshot of the MySQL: screenshot of the mySQL

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

**** Edit **** I think this is associated with allowing data fusion to access to our production data my second question is: How can I know what is the Google Data Fusion IP address?

if someone can help me that will be wonderful

thank you


回答1:


This error indicates that Cloud Data Fusion is unable to connect to mysql via JDBC with the given credentials (Host/port/User). You will need to ensure that the user provided can connect from any host. To trouble shoot this further, please do the following:

  1. SSH to the mysql box and run netstat -tln and confirm if the port where mysql is running on is 3306
  2. Login to mysql using Mysql CLI or a workbench tool and run the following SHOW DATABASES to list all the Databases in mysql and see if the one you are accessing is present
  3. Ensure that the user that is accessing mysql from Data Fusion can access from any hosts by running SHOW GRANTS FOR 'username'@'%'

Here are some additional articles that might help with troubleshooting. https://serverfault.com/questions/89955/unable-to-connect-to-mysql-through-jdbc-connector-through-tomcat-or-externally




回答2:


Even if you try to access via public IP it'll not work. I had the same issue. Because you have to enable VPC peering between the Datafusion tenant project id with your VPC.

Detailed steps are here: https://cloud.google.com/data-fusion/docs/how-to/create-private-ip



来源:https://stackoverflow.com/questions/56835022/failed-to-connect-with-mysql-using-google-data-fusion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!