package
0.0.0-20210726165104-42ea4af6fad4
Repository: https://github.com/chenyendu/gowebdev.git
Documentation: pkg.go.dev
# README
Using MySQL
- Install MySQL
- We will need a MySQL driver
- go get -u github.com/go-sql-driver/mysql
- read the documentation
- see all SQL drivers
- Astaxie's book
- Include driver in your imports
- _ "github.com/go-sql-driver/mysql"
- Read the documentation
- Determine the Data Source Name
- user:password@tcp(localhost:5555)/dbname?charset=utf-8
- Read the documentation
- Open a connection
- db, err := sql.Open("mysql", "user:password@tcp(localhost:5555)/dbname?charset=utf-8)