Skip to content
dklannPublic

About

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

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址