sqlmapproject/sqlmap · error · SqlmapSyntaxException
option '-d' is incompatible with option '--dbms'
Error message
option '-d' is incompatible with option '--dbms'
What it means
Validation guard in _basicOptionValidation: -d (direct DBMS connection) was combined with --dbms. With a direct connection the DBMS is already known from the connection string, so --dbms is meaningless/conflicting.
Solutions
- Remove --dbms when using a direct connection via -d
- Encode the correct backend in the direct connection string (e.g. mysql://user:pass@host:port/db)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/core/option.py:2841 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/6e3a47a4e3ff3d15.
Report an issue: GitHub.
Appendix: source
Thrown at lib/core/option.py:2841
if conf.base64Parameter and conf.tamper:
errMsg = "option '--base64' is incompatible with option '--tamper'"
raise SqlmapSyntaxException(errMsg)
if conf.eta and conf.verbose > defaults.verbose:
errMsg = "switch '--eta' is incompatible with option '-v'"
raise SqlmapSyntaxException(errMsg)
if conf.secondUrl and conf.secondReq:
errMsg = "option '--second-url' is incompatible with option '--second-req')"
raise SqlmapSyntaxException(errMsg)
if conf.direct and conf.url:
errMsg = "option '-d' is incompatible with option '-u' ('--url')"
raise SqlmapSyntaxException(errMsg)
if conf.direct and conf.dbms:
errMsg = "option '-d' is incompatible with option '--dbms'"
raise SqlmapSyntaxException(errMsg)
if conf.titles and conf.nullConnection:
errMsg = "switch '--titles' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.dumpTable and conf.search:
errMsg = "switch '--dump' is incompatible with switch '--search'"
raise SqlmapSyntaxException(errMsg)
if conf.alert and os.environ.get("SQLMAP_UNSAFE_ALERT") != '1':
errMsg = "for security reasons, to prevent execution of potentially malicious "
errMsg += "OS commands via configuration files or copy-paste attacks, "
errMsg += "the '--alert' option requires the environment variable "
errMsg += "'SQLMAP_UNSAFE_ALERT=1' to be explicitly set"
raise SqlmapSystemException(errMsg)
if conf.evalCode and os.environ.get("SQLMAP_UNSAFE_EVAL") != '1':
errMsg = "for security reasons, to prevent execution of potentially malicious "View on GitHub (pinned to 0a35b20e39)