File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,16 @@ A DSN in its fullest form:
64
64
username:password@protocol(address)/dbname?param=value
65
65
```
66
66
67
- Except the databasename all values are optional, so the shortest possible DSN is:
67
+ Except the databasename all values are optional, so the minimal DSN is:
68
68
```
69
69
/dbname
70
70
```
71
71
72
+ If you don't want to preselect a database, leave ` dbname ` empty:
73
+ ```
74
+ /
75
+ ```
76
+
72
77
### Password
73
78
Passwords may consist of any char. No escaping necessary.
74
79
@@ -110,6 +115,11 @@ user:password@tcp(localhost:5555)/dbname?charset=utf8
110
115
user:password@/dbname
111
116
```
112
117
118
+ No Database preselected:
119
+ ```
120
+ user:password@/
121
+ ```
122
+
113
123
```
114
124
user:password@tcp([de:ad:be:ef::ca:fe]:80)/dbname
115
125
```
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
18
18
)
19
19
20
20
// Packets documentation:
21
- // http://forge .mysql.com/wiki/MySQL_Internals_ClientServer_Protocol
21
+ // http://dev .mysql.com/doc/internals/en/client-server-protocol.html
22
22
23
23
// Read packet to buffer 'data'
24
24
func (mc * mysqlConn ) readPacket () ([]byte , error ) {
You can’t perform that action at this time.
0 commit comments