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
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
48
48
## Installation
49
49
Simple install the package to your [$GOPATH](https://github.com/golang/go/wiki/GOPATH"GOPATH") with the [go tool](https://golang.org/cmd/go/"go command") from shell:
50
50
```bash
51
-
$ go get -u github.com/go-sql-driver/mysql
51
+
go get -u github.com/go-sql-driver/mysql
52
52
```
53
53
Make sure [Git is installed](https://git-scm.com/downloads) on your machine and in your system's `PATH`.
54
54
@@ -114,7 +114,7 @@ This has the same effect as an empty DSN string:
114
114
115
115
```
116
116
117
-
`dbname` is escaped by [PathEscape()]()https://pkg.go.dev/net/url#PathEscape) since v1.8.0. If your database name is `dbname/withslash`, it becomes:
117
+
`dbname` is escaped by [PathEscape()](https://pkg.go.dev/net/url#PathEscape) since v1.8.0. If your database name is `dbname/withslash`, it becomes:
118
118
119
119
```
120
120
/dbname%2Fwithslash
@@ -127,7 +127,7 @@ Passwords can consist of any character. Escaping is **not** necessary.
127
127
128
128
#### Protocol
129
129
See [net.Dial](https://golang.org/pkg/net/#Dial) for more information which networks are available.
130
-
In general you should use an Unix domain socket if available and TCP otherwise for best performance.
130
+
In general you should use a Unix domain socket if available and TCP otherwise for best performance.
131
131
132
132
#### Address
133
133
For TCP and UDP networks, addresses have the form `host[:port]`.
@@ -151,7 +151,7 @@ Default: false
151
151
```
152
152
153
153
`allowAllFiles=true` disables the file allowlist for `LOAD DATA LOCAL INFILE` and allows *all* files.
154
-
[*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)
154
+
[*Might be insecure!*](https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-local)
155
155
156
156
##### `allowCleartextPasswords`
157
157
@@ -200,7 +200,7 @@ Valid Values: <name>
200
200
Default: none
201
201
```
202
202
203
-
Sets the charset used for client-server interaction (`"SET NAMES <value>"`). If multiple charsets are set (separated by a comma), the following charset is used if setting the charset failes. This enables for example support for `utf8mb4` ([introduced in MySQL 5.5.3](http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html)) with fallback to `utf8` for older servers (`charset=utf8mb4,utf8`).
203
+
Sets the charset used for client-server interaction (`"SET NAMES <value>"`). If multiple charsets are set (separated by a comma), the following charset is used if setting the charset fails. This enables for example support for `utf8mb4` ([introduced in MySQL 5.5.3](http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html)) with fallback to `utf8` for older servers (`charset=utf8mb4,utf8`).
204
204
205
205
See also [Unicode Support](#unicode-support).
206
206
@@ -509,7 +509,7 @@ For this feature you need direct access to the package. Therefore you must chang
509
509
import"github.com/go-sql-driver/mysql"
510
510
```
511
511
512
-
Files must be explicitly allowed by registering them with `mysql.RegisterLocalFile(filepath)` (recommended) or the allowlist check must be deactivated by using the DSN parameter `allowAllFiles=true` ([*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)).
512
+
Files must be explicitly allowed by registering them with `mysql.RegisterLocalFile(filepath)` (recommended) or the allowlist check must be deactivated by using the DSN parameter `allowAllFiles=true` ([*Might be insecure!*](https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-local)).
513
513
514
514
To use a `io.Reader` a handler function must be registered with `mysql.RegisterReaderHandler(name, handler)` which returns a `io.Reader` or `io.ReadCloser`. The Reader is available with the filepath `Reader::<name>` then. Choose different names for different handlers and `DeregisterReaderHandler` when you don't need it anymore.
0 commit comments