Difference between revisions of "Database Server"
Line 6: | Line 6: | ||
First, launch a '''Server''' and '''Client''' instance of BaseX: double click on the '''BaseX Server/Client''' icons, or run the <code>basexserver</code> and <code>basexclient</code> scripts. [[Startup#BaseX Server|Follow this link]] for more information (or check out the additional [[Command-Line Options#BaseX Server|command-line options]]). | First, launch a '''Server''' and '''Client''' instance of BaseX: double click on the '''BaseX Server/Client''' icons, or run the <code>basexserver</code> and <code>basexclient</code> scripts. [[Startup#BaseX Server|Follow this link]] for more information (or check out the additional [[Command-Line Options#BaseX Server|command-line options]]). | ||
− | ==Working | + | ==Working on Command-Line== |
The BaseX command-line client provides similar features to the [[Standalone Mode]]. The major difference is that all commands will be executed by the BaseX server instance. As a consequence, paths/URIs to resources need to be resolvable by the server (file contents will not be transfered to the server). | The BaseX command-line client provides similar features to the [[Standalone Mode]]. The major difference is that all commands will be executed by the BaseX server instance. As a consequence, paths/URIs to resources need to be resolvable by the server (file contents will not be transfered to the server). |
Revision as of 11:19, 12 August 2015
This step by step tutorial is part of the Getting Started Guide. It shows you how to run BaseX in client-server mode from a terminal. You can copy and paste all commands to get them running on your machine. After you finished this tutorial, you will be familiar with the basic administration of BaseX. Visit the commands section for a complete list of database commands.
Startup
First, launch a Server and Client instance of BaseX: double click on the BaseX Server/Client icons, or run the basexserver
and basexclient
scripts. Follow this link for more information (or check out the additional command-line options).
Working on Command-Line
The BaseX command-line client provides similar features to the Standalone Mode. The major difference is that all commands will be executed by the BaseX server instance. As a consequence, paths/URIs to resources need to be resolvable by the server (file contents will not be transfered to the server).
Username and password can also be specified as command-line option. To evaluate commands without entering the console mode, you can use the -c
option on the command line:
basexclient -V -Uadmin -Padmin -c "CREATE DB input <example/>; XQUERY /" Database 'input' created in 13.85 ms. <example/> Query: / Parsing: 0.18 ms Compiling: 0.04 ms Evaluating: 0.12 ms Printing: 0.07 ms Total Time: 0.41 ms Hit(s): 1 Item Updated: 0 Items Printed: 10 Bytes Read Locking: local [input] Write Locking: none Query "user" executed in 0.41 ms.