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
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,8 @@ No need to worry about closing the connection.
71
71
72
72
### macOS
73
73
74
+
#### Using brew
75
+
74
76
Install MySQL
75
77
76
78
```shell
@@ -81,12 +83,29 @@ mysql.server start
81
83
82
84
Link MySQL during `swift build`
83
85
84
-
```swift
86
+
```shell
85
87
swift build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/lib
86
88
```
87
89
88
90
`-I` tells the compiler where to find the MySQL header files, and `-L` tells the linker where to find the library. This is required to compile and run on macOS.
89
91
92
+
#### Using macports
93
+
94
+
Install MySQL
95
+
96
+
```shell
97
+
sudo port install mysql57
98
+
sudo port selectmysql mysql57
99
+
```
100
+
101
+
Link MySQL during `swift build`
102
+
103
+
```shell
104
+
swift build -Xswiftc -I/opt/local/include/mysql57/mysql/mysql -Xlinker -L/opt/local/lib/mysql57/mysql
105
+
```
106
+
107
+
`-I` tells the compiler where to find the MySQL header files, and `-L` tells the linker where to find the library. This is required to compile and run on macOS.
0 commit comments