Skip to content

Commit 99da113

Browse files
authored
Merge pull request #85 from apurvis/master
Better troubleshooting docs; add support for percona libraries on OSX
2 parents e86f103 + 7f2f0b6 commit 99da113

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,14 @@ If `MYSQL_TUPLES` are passed as the last argument, then tuples will be returned
116116
# How to solve MySQL library not found error
117117

118118
This error may occur during `using MySQL`. To resolve this-
119-
* Ubuntu: Just add the MariaDB/MySQL .so file to lib_choices array in src/config.jl. If it is already there
120-
make sure LD_LIBRARY_PATH contains the MariaDB/MySQL .so file directory path. Usually this is something like
121-
`/usr/local/lib/mariadb/`.
122-
* OSX: Same as above. In this case the file will be something like libmysqlclient.dylib.
123-
* Windows: The file will be picked up automatically if MySQL is installed correctly. If you still get the error add the location of libmysql.dll to PATH.
119+
* **Ubuntu**: Just add the MariaDB/MySQL `.so` file to the `lib_choices` array in `src/config.jl` (the system file is at `~/.julia/v0.7/MySQL/src/config.jl`). If it is already there make sure `LD_LIBRARY_PATH` contains the MariaDB/MySQL `.so` file directory path. Usually this is something like `/usr/local/lib/mariadb/`.
120+
* **OSX**: Same as above. In this case the file will be something like `libmysqlclient.dylib`. Homebrew users should look in `/usr/local/Cellar/mysql`.
121+
* **Windows**: The file will be picked up automatically if MySQL is installed correctly. If you still get the error add the location of `libmysql.dll` to PATH.
124122

125123
# Tests
126124

127-
To run the tests you must have MySQL server running on the host. Set the constants HOST and ROOTPASS
128-
in test/runtests.jl to the host and root password on your test setup. Run the tests using:
125+
To run the tests you must have MySQL server running on the host. Set the constants HOST and ROOTPASS
126+
in `test/runtests.jl` to the host and root password on your test setup. Run the tests using:
129127
```
130128
Pkg.test("MySQL")
131129
```

src/config.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This snippet is taken from https://github.com/Dynactionize/MariaDB.jl
2-
# This the configuration file for finding the shared object (dll) file
2+
# This the configuration file for finding the shared object (dll) file
33
# for MySQL/MariaDB API. Make sure to add the location of the files to
44
# path for this to work.
5-
#
5+
#
66
# TODO: Need to update lib_choices for Mac OS X and Windows.
77

88
let
@@ -12,7 +12,7 @@ let
1212
@static is_linux() ? (lib_choices = ["libmysql.so", "libmysqlclient.so",
1313
"libmysqlclient_r.so", "libmariadb.so",
1414
"libmysqlclient_r.so.16"]) : nothing
15-
@static is_apple() ? (lib_choices = ["libmysqlclient.dylib"]) : nothing
15+
@static is_apple() ? (lib_choices = ["libmysqlclient.dylib", "libperconaserverclient.dylib"]) : nothing
1616
@static is_windows() ? (lib_choices = ["libmysql.dll", "libmariadb.dll"]) : nothing
1717
local lib
1818
for lib in lib_choices
@@ -26,4 +26,3 @@ let
2626
@eval const mysql_lib = $lib
2727
end
2828
end
29-

0 commit comments

Comments
 (0)