Skip to content
/ mycnf Public

Golang module to read a .my.cnf file and extract credentials and other details to connect to a MySQL database.

License

Notifications You must be signed in to change notification settings

dklann/mycnf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mycnf

Read a .my.cnf file and extract credentials and other details to connect to a MySQL database.

func ReadMyCnf reads a .my.cnf (~/.my.cnf by default), searches for the named "profile" in that file and returns a DSN (string) suitable for use in sql.Open().

This is based on a gist from https://gist.github.com/nickcarenza and modified to accept default values passed in a structure from the calling function.

Read the complete documentation at GoDoc.

About

Golang module to read a .my.cnf file and extract credentials and other details to connect to a MySQL database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages