Optional: Create an Options File
- Last Updated: April 14, 2026
- 1 minute read
- MarkLogic Server
- Version 11.0
- Documentation
You can encapsulate mlcp command line options in an options file; for details, see Options File Syntax. An options file is convenient for re-use of commonly used options. Also, using an options file can help you avoid command line interpolation of quotes by the shell.
The examples use an options file to save MarkLogic connection related options so that you can easily re-use them across multiple commands. This section describes how to create this file.
If you prefer to pass the connection options directly on the command line instead, add -username, -password, -host, and possibly -port options to the example mlcp commands in place of -options_file.
Use the following procedure to create the example options file:
-
If you are not already at the top level of your work area, change directory to this location. That is, the
gsfolder created in Prepare to Run the Examples.cd gs -
Create a file named
conn.txtwith the following contents. Each line is either an option name or a value for the preceding option.-username your_username-password your_password-host localhost -port 8000 -
Edit
conn.txtand modify the values of the-usernameand-passwordoptions to match your environment. -
Optionally, modify the
-hostand/or-portoption values. The host and port must identify a MarkLogic Server App Server that supports the XDBC protocol. MarkLogic Server comes with an App Server pre-configured on port 8000 that supports XDBC, attached to the Documents database. You can choose a different App Server. -
You should now have the following file structure:
gs/ conn.txt import/ one.xml two.json