Golang-MySQL-CRUD-Bookstore-Management-API icon indicating copy to clipboard operation
Golang-MySQL-CRUD-Bookstore-Management-API copied to clipboard

panic: dial tcp 127.0.0.1:3306: connect: connection refused

Open gauhun opened this issue 1 year ago • 1 comments

tried solutions (non are helping) please help...

d, err := gorm.Open("mysql", "akhil:Axlesharma@12@/simplerest?charset=utf8&parseTime=True&loc=Local")

and starting server with this code of http.ListenAndServe("localhost:9010", r)

getting this error panic: dial tcp 127.0.0.1:3306: connect: connection refused

Then tried a solution mentioned #VonC but not working

	d, err := gorm.Open("mysql", "gauhun:startProj@123@tcp(localhost:5555)/bookBase?charset=utf8&loc=Local")

got no issue in terminal but postman throws this error Error: socket hang up

gauhun avatar Jan 15 '24 12:01 gauhun

I have the same issue, did you find the solution?

antoniok08 avatar Sep 03 '24 21:09 antoniok08