title: How to open a remote mysql connection?
body: <p>I'm trying to connect to remote mysql database using go and the database/sql package.
  I find the go/mysql documentation confusing. It seems there is no single example how to connect to a remote host. Like everyone would use localhost.
  So far I have this </p>
  
  <pre><code>   import (
          "database/sql"
          _ "github.com/ziutek/mymysql/godrv"    
          db, err := sql.Open("mymysql", "tcp:"+dbHost*dbName+"/"+user+"/"+pass)
          defer db.Close()
  </code></pre>
  
  <p>Based on the docs from <a href="https://github.com/ziutek/mymysql">https://github.com/ziutek/mymysql</a> </p>
  
  <pre><code>[PROTOCOL_SPECFIIC*]DBNAME/USER/PASSWD
  //
  // where protocol specific part may be empty (this means connection to
  // local server using default protocol). Currently possible forms:
  //   DBNAME/USER/PASSWD
  //   unix:SOCKPATH*DBNAME/USER/PASSWD
  //   unix:SOCKPATH,OPTIONS*DBNAME/USER/PASSWD
  //   tcp:ADDR*DBNAME/USER/PASSWD
  //   tcp:ADDR,OPTIONS*DBNAME/USER/PASSWD
  </code></pre>
  
  <p>I also tried</p>
  
  <pre><code> db, err := sql.Open("mymysql", "tcp:"+dbHost, dbName+"/"+user+"/"+pass) 
  </code></pre>
  
  <p>and it's not working either. The whole syntax seems cryptic.</p>