# Connect with Go

SingleStore is wire-compliant with MySQL, which means you can connect to your SingleStore cluster with Go similar to a MySQL database.

## Prerequisites

* A SingleStore cluster
* Go
* The `mysql` module for Go:
  ```shell
  go get github.com/go-sql-driver/mysql
  ```

## Connection Details

To connect your Go application to your SingleStore cluster, you'll need the following information:

* Host: the endpoint or IP Address of your SingleStore cluster.
* Port: default is `3306`
* User: `root`
* Password
* Database

Here's an example of a Go connection for a SingleStore cluster:

```go
func main() {

	HOSTNAME := "svc-12345678-1234-1234-1234-2d4b84322fd8-ddl.aws-region-1.svc.singlestore.com"
	PORT := "3306"
	USERNAME := "admin"
	PASSWORD := "<your admin password>"
	DATABASE := "acme"

	connection := USERNAME + ":" + PASSWORD + "@tcp(" + HOSTNAME + ":" + PORT + ")/" + DATABASE + "?parseTime=true"
	db, err := sql.Open("mysql", connection)
}
```

## More Information

For a complete example, including samples of CRUD operations, refer to this [GitHub repository](https://github.com/singlestore-labs/start-with-singlestore-go).

For information on using stored procedures with Go, see [GitHub](https://github.com/singlestore-labs/start-with-singlestore-go-stored-procedure).

***

Modified at: September 26, 2025

Source: [/db/v9.1/developer-resources/connect-with-application-development-tools/connect-with-go/](https://docs.singlestore.com/db/v9.1/developer-resources/connect-with-application-development-tools/connect-with-go/)

(An index of the documentation is available at /llms.txt)
