Skip to content
Discussion options

You must be logged in to vote

This is the connector

https://cdn.mysql.com/archives/mysql-connector-c/mysql-connector-c-6.1.11-winx64.zip

unzip it, for example in C:\mysql-connector-c-6.1.11-winx64

then add windows env variable

MYSQLCLIENT_LIB_DIR

pointing to

"C:\mysql-connector-c-6.1.11-winx64\lib\vs14"

then create a .env file in the project root, at same level of Cargo.toml

DATABASE_URL=mysql://user:password@localhost/dbname
MYSQLCLIENT_LIB_DIR="C:\mysql-connector-c-6.1.11-winx64\lib\vs14"

Then install from windows prompt (do not use prompt from vs code !)

cargo install diesel_cli --no-default-features --features mysql

Ensure your .toml has this

[dependencies]
diesel = { version = "1.4.4", features = ["mysql"] }
d…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@realtebo
Comment options

@weiznich
Comment options

@weiznich
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by yk0n9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants