求助:mydumper无法使用SSL连接,参数尝试无效该如何解决?
Let’s work through why you’re stuck getting SSL to work with your mydumper build:
1. First, Confirm SSL Support Was Compiled Into Your Build
The 2018 commit you referenced does add SSL functionality, but this code only gets included if mydumper is compiled with OpenSSL dependencies present. On Ubuntu 17.10, it’s easy to miss the required packages during the build process:
- First, install the OpenSSL development libraries if you haven’t already:
sudo apt-get install libssl-dev - Re-compile mydumper from scratch, and check the build logs (either from
configureor CMake) to confirm OpenSSL was detected. For CMake, you should see a line like:-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so (found version "1.0.2g")
If you don’t see this line, the SSL code wasn’t included in your binary—which explains why --help shows no SSL options and your flags have no effect.
2. Use the Correct SSL Command-Line Syntax
Once SSL support is properly compiled in, the flags work as simple toggles—you don’t need to pass a value like 1 or true. The valid options are:
- Long form:
--ssl - Shorthand:
-s
So your command should look like this:
mydumper --ssl -u your_username -p your_password -h your_db_host ...
3. Verify Your MySQL Server’s SSL Configuration
Even if mydumper is set up for SSL, your MySQL server needs to be configured to accept encrypted connections:
- Log into your MySQL server and run
SHOW VARIABLES LIKE '%ssl%';—thehave_sslvalue should beYES. - Check that your database user is allowed to connect via SSL with
SHOW GRANTS FOR 'your_user'@'%';—look forREQUIRE SSL(if enforced) or ensure the user isn’t restricted to non-SSL connections.
4. Try Updating to a Newer Mydumper Version
Your build (bb963448d1183e933cc540b52a62a1da27a92117) is post-SSL commit, but early iterations of the feature might have had bugs. Pulling the latest code from the repository and re-compiling could resolve any unforeseen issues with the SSL implementation.
内容的提问来源于stack exchange,提问作者jairud

