The database URI returned by the QuickDB service isn't understood by the go-mysql-driver
(original string)
| 8 | // The database URI returned by the QuickDB service isn't understood by the |
| 9 | // go-mysql-driver |
| 10 | func MySQLReformatURI(original string) (string, error) { |
| 11 | u, err := url.Parse(original) |
| 12 | if err != nil { |
| 13 | return "", err |
| 14 | } |
| 15 | return fmt.Sprintf("%s@tcp(%s)%s?multiStatements=true&parseTime=true&tls=true", u.User, u.Host, u.Path), nil |
| 16 | } |