Arquivo da categoria: MySQL

How to connect to Amazon RDS using go-sql-driver

import (
    "database/sql"
    "fmt"

    _ "github.com/go-sql-driver/mysql"
)

db, err := sql.Open("mysql", "<username>:<password>@tcp(<AWSConnectionEndpoint >:<port>)/<dbname>")

if err != nil {
    fmt.Print(err.Error())
}

defer db.Close()
https://stackoverflow.com/questions/25999714/how-to-connect-to-amazon-rds-using-go-sql-driver

Share and Enjoy !

0Shares
0 0