Creating the RethinkDB Database from the Command Line

I need to programmatically create a RethinkDB database from the command line. However ... I do not know how to do this.

I know that I can do this from the web interface or from the client driver, but is there a command that does this?

+4
source share
3 answers

If you have a Python driver, you can do the following:

echo -e  'import rethinkdb as r; \nr.connect("localhost", 28015).repl() \nr.db_create("NAME_OF_YOUR_DATABASE").run()'  | python

To install the Python driver, you can simply use pip:

pip install rethinkdb

This may not be the best way to do this, but it may be the easiest way to achieve this if you want to create the database on a single line from the command line.

If you are a Node.js developer, I would recommend using the two specified mglukhovsky CLIs.

+3
source
+4

As with RethinkDB 2.0, I believe that you can only do this using the web interface or the client driver. Is there a reason a Python or Ruby shell bypass doesn't work here?

+1
source

All Articles