Fixed MySQL server to allow external connections

This commit is contained in:
Luke Else 2022-01-23 16:43:48 +00:00
parent fe1205dff1
commit d4d892f6f2

View File

@ -26,7 +26,12 @@ func main() {
}
defer db.Close()
//Make a Query to the database
db.Exec("INSERT INTO ")
insert, err := db.Query("INSERT INTO waypoints (name, type, frequency, longitude, latitude) VALUES ('WILLO', 'NDB', 12000, 'test', 'test')")
//Close the connection
db.Close()
if err != nil {
fmt.Println(err)
}
if insert != nil {
fmt.Println("Success")
}
}