Fixed MySQL server to allow external connections
This commit is contained in:
parent
fe1205dff1
commit
d4d892f6f2
9
main.go
9
main.go
@ -26,7 +26,12 @@ func main() {
|
|||||||
}
|
}
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
//Make a Query to the database
|
//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
|
//Close the connection
|
||||||
db.Close()
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
if insert != nil {
|
||||||
|
fmt.Println("Success")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user