You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,16 +40,16 @@ Note: `go get` doesn't install the master branch, but the tag `go1`, which is al
37
40
---------------------------------------
38
41
39
42
## Installation
40
-
Simple install the package with the go tool from shell:
43
+
Simple install the package to your [$GOPATH](http://code.google.com/p/go-wiki/wiki/GOPATH"GOPATH")with the [go tool](http://golang.org/cmd/go/ go command) from shell:
41
44
```bash
42
45
$ go get github.com/Go-SQL-Driver/MySQL
43
46
```
44
47
Make sure [Git is installed](http://git-scm.com/downloads) on your machine and in your system's `PATH`.
45
48
46
49
## Usage
47
-
_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface, so all you need to do is import the driver and open a new Database-Connection with the given driver.
50
+
_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface, so all you need to do is to import the driver and open a new database connection with the given driver.
48
51
49
-
Use `"mysql"` as `driverName` and a valid [DSN](#dsn-data-source-name) as `dataSourceName`
52
+
Use `mysql` as `driverName` and a valid [DSN](#dsn-data-source-name) as `dataSourceName`
@@ -56,10 +59,12 @@ db, e := sql.Open("mysql", "user:password@/dbname?charset=utf8")
56
59
57
60
All further methods are listed here: http://golang.org/pkg/database/sql
58
61
62
+
[Examples are available in our Wiki](https://github.com/Go-SQL-Driver/MySQL/wiki/Examples"Go-MySQL-Driver Examples").
63
+
59
64
60
65
## DSN (Data Source Name)
61
66
62
-
The Data Source Name has a common format, like e.g. [PEAR DB](http://pear.php.net/manual/en/package.database.db.intro-dsn.php) uses it, but without type-prefix:
67
+
The Data Source Name has a common format, like e.g. [PEAR DB](http://pear.php.net/manual/en/package.database.db.intro-dsn.php) uses it, but without type-prefix (optional parts marked by squared brackets):
@@ -80,7 +85,7 @@ If you do not want to preselect a database, leave `dbname` empty:
80
85
```
81
86
82
87
### Password
83
-
Passwords can consist of any character. Escaping is not necessary.
88
+
Passwords can consist of any character. Escaping is **not** necessary.
84
89
85
90
### Protocol
86
91
See [net.Dial](http://golang.org/pkg/net/#Dial) for more information which networks are available.
@@ -129,6 +134,9 @@ No Database preselected:
129
134
user:password@/
130
135
```
131
136
137
+
## Testing / Development
138
+
To run the driver tests you may need to adjust the configuration. See [this Wiki-Page](https://github.com/Go-SQL-Driver/MySQL/wiki/Testing"Testing") for details.
0 commit comments