diff --git a/irc/mysql/history.go b/irc/mysql/history.go index b1b86a23..9d7b584d 100644 --- a/irc/mysql/history.go +++ b/irc/mysql/history.go @@ -90,6 +90,8 @@ func (m *MySQL) Open() (err error) { var address string if m.config.Port != 0 { address = fmt.Sprintf("tcp(%s:%d)", m.config.Host, m.config.Port) + } else { + address = fmt.Sprintf("unix(%s)", m.config.Host) } m.db, err = sql.Open("mysql", fmt.Sprintf("%s:%s@%s/%s", m.config.User, m.config.Password, address, m.config.HistoryDatabase))