Hello, everyone. I downloaded the SQL-connect driver for GOlang from GitHub
and cannot seem to connect to my MYSQL database which was installed along
with XAMPP. Below is the code:
package main
import(
"fmt"
"database/sql"
_ "github.com/go-sql-driver"
)
func main(){
mysql, err := sql.Open("mysql", "user:pass@tcp(127.0.0.1)/database")
p.DBstatus = mysql == nil
mysql.Close()
fmt.Println(err)
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.