AWS Aurora MySQL serverless: how to connect from MySQL Workbench

前端 未结 8 1204
忘掉有多难
忘掉有多难 2020-12-13 18:46

I was trying to use AWS Aurora Serverless for MySQL in my project, but I am impossible to connect to it, though I have the endpoint, username, password.

What I have

8条回答
  •  粉色の甜心
    2020-12-13 19:02

    This can be achieved using haproxy

    Install Haproxy on Centos-> yum install haproxy

    delete existing configuration in this file /etc/haproxy/haproxy.cfg and add the below lines(make sure you replace your RDS endpoint url in below configuration)

    global user haproxy group haproxy

    defaults retries 2 timeout connect 3000 timeout server 5000 timeout client 5000

    listen mysql-cluster bind 0.0.0.0:3307 mode tcp server mysql-1 test.cluster-crkxsds.us-west-2.rds.amazonaws.com:3306

    After modifying the file,start the haproxy -> service haproxy start

    You can connect Aurora RDS in MYSQL Workbench using Public IP with port no 3307

提交回复
热议问题