Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add port option #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion main.go
Expand Up @@ -44,6 +44,7 @@ var prefix = flag.String("prefix", "drp_", "Drupal table prefix")
var user = flag.String("user", "", "Drupal user (defaults to be the same as the Drupal database name)")
var pass = flag.String("pass", "", "Drupal password (you will be prompted for the password if this is absent)")
var host = flag.String("host", "localhost", "Mysql host")
var port = flag.String("port", "3306", "Mysql server port")
var emvideoField = flag.String("emvideoField", "", "name of CCK field that holds emvideo data.")

//var dir = flag.String("dir", "", "Run in directory")
Expand Down Expand Up @@ -83,7 +84,7 @@ func main() {
}

// username:password@protocol(address)/dbname?param=value
db := model.Connect(*driver, *user+":"+*pass+"@tcp("+*host+")/"+*dbName, *prefix, *verbose)
db := model.Connect(*driver, *user+":"+*pass+"@tcp("+*host+":"+*port+")/"+*dbName, *prefix, *verbose)
cckFieldTypes, err := db.CCKFields()
if err != nil && *emvideoField != "" {
util.Fatal("Unable to retrieve CCK Field metadata: %s", err.Error())
Expand Down