Setting login information


I’ve noticed that the default install of MapD attempts a force login of the default mapd user for the mapd database. As we tried to setup new databases and users, it was pretty hard to access them as loading Immerse in a browser would force log back into the mapd account. Once I changed the password, I now get kicked to the login page with an incorrect password error, and am then able to log into a different user.

However, as I keep doing out of habit, reloading the page or hitting enter in the browser URL forces a log out instead of staying logged in. I was wondering if there was a way to avoid that, and if not at least at a minimum, being able to change the auto user/pass/db information (as I do have the machine behind a firewall).

Much appreciated,

Low cost way to evaluate Mapd
Common config. for 3rd party tilemap?


Thanks for your interest in MapD

The default behaviour when connecting to immerse can be controlled by a servers.json file.

How are you currently starting MapD. Are you using startmapd?

We would recommend for a more serious installation of MapD that you move to a systemd controlled MapD system with configuration files.

The steps to follow are:

  1. cd <mapd_home>/systemd/
  2. run ./
  3. During the process of answering the questions during running this script is to identify the MAPD_STORAGE directory
  4. After the script has run if you look in your MAPD_STORAGE directory you will see a default mapd.conf has been created
  5. Viewing that file it should contain some default starting information about your MapD install
port = 9091
http-port = 9090
data = "<MAPD_STORAGE>/data"

port = 9092
frontend = "<MAPD_PATH>/frontend"

At this point you can now control the MapD services with systemctl commands

to Start:
sudo systemctl start mapd_server
sudo systemctl start mapd_web_server

To check
sudo systemctl status mapd_server
sudo systemctl status mapd_web_server

To Stop
sudo systemctl stop mapd_server
sudo systemctl stop mapd_web_server

You will still be getting the auto login behaviour at this point

Now go in and edit your mapd.conf

In the [web] section add the line

servers-json = "<MAPD_STORAGE>/servers.json"

Create a file called servers.json in your MAPD_STORAGE directory


Now restart mapd_web_server
sudo systemctl restart mapd_web_server

At this point when you try to log onto immerse you will always be presented with a blank login screen asking you to enter all the details of where you want to connect to.

if you want to at least supply a default database you can populate the appropriate field

A side note here is that you can use config files without having to use systemd, both mapd_server and mad_web_server will accept a --config parameter if for some reason you do not want to have to set up systemd


Mapd not support webservice and IFrame

Many thanks, that servers.json did the trick perfectly of auto login. I was using systemctl for a bit but then decided to write a homegrown script to control the booting and rebooting, since for dev I like to have mapd_server running inside a screen as I can attach to see output as needed in a side term.

I noticed that once I got servers.json in place, login looks great; although I notice that when I’m on a dashboard and reload the page, it spits me back to login and then sends me to the dashboard listing page (instead of the dashboard I was on). I also saw that using the “share this link” url redirects directly back to the dashboard, so was curious if there’s a way to default replicate the same sort of passthrough that brings you right back to dashboard you were on if you reload.

For clarification of what we’re doing, we have a chrome extension that keeps a look on the open tab to see if there’s mouse activity… if the page isnt touched within 60s, we have the page reload (as we’re feeding in data to mapD in an automated stream system in the background), such that we’re trying to emulate our data set updating every 60s or so for an interactive in-house stats display. Obviously, i’d be even more open to having that auto data refresh functionality right in the dashboard, although I didn’t that as an option :slight_smile:



Glad it helped

Hmmm this will not get you all the way to where you want but

If you full populate the servers,json file (meaning fill in user password and db) you can also add

"loadDashboard": "My prefered dashboard"

and then it will take you straight to the particular dashboard you want, but it will always do it with the same user id and password etc which must be hardcoded in the servers.json


Excellent, this should suffice for now :slight_smile: We have one of our frontend gurus doing some hacking of a copy of the default frontend (since I noticed you can specify different templates for frontend on load). Figured it would be interesting to see how we can finesse it. Would be more than happy to share our code if it’s useful.


PS. Regarding your desire to see the running server output. You could just use
journalctl -f -u mapd_server
rather than having to run it in a window to see the ongoing output



Thanks for the note… extremely helpful!


Hi! If I need to manage multiple users, would you recommend adding them to the servers.json file ?



I am assuming that the password mentioned in the servers.json file and the one set inside the DB should be the same.

Are there any other parameters we can add into servers.json file.




No, adding users to servers.json is not how you add more users to a DB.

If you want users to have to log in, you would remove the username and password from servers.json. This will cause immerse to start with a login and password screen. Each user would then login with their own credentials.

To create additional users see documentations here:



I think there is an issue with setting up users on my end.

Here is what I did:

root@PDCUBUNT1:/data/mapd/data# /data/mapd/bin/mapdql -u mapd -p XXXX
User mapd connected to database mapd
mapdql> create user i2analyst (password = ‘XXXX’ );
Exception: User i2analyst already exists.
mapdql> drop user i2analyst ;
mapdql> create user i2analyst (password = ‘XXXX’);
mapdql> \q

User mapd disconnected from database mapd
root@PDCUBUNT1:/data/mapd/data# /data/mapd/bin/mapdql -u i2analyst -p XXXX
User i2analyst is not authorized to access database mapd

How do I provide this user ‘Read-only’ access to the mapd DB?




Please refer to

There is no readonly controls on a user per user basis currently. Fine grained permissions will be arriving in the product very soon.



Looks like I am still running into user setup issues.

I used mapdql to setup a user and successfully setup a user in the mapd DB. I can also see the user with the \u switch.

However when I return to the webUI, I get a new error message which says ‘*User xxxx is not authorized to access database mapd’

Looks like I might be missing another step. Please let me know.




i suspect you are missing giving the user access to the database

run something like this as superuser to give a user access to a DB

ALTER USER user1 (INSERTACCESS = 'dbname');



Yup, that worked.

Thx Ben


Dwayne, Is there a list of options documented at some place (refering to the INSERTACCESS = ‘dbname’ setting) for user setup ?




There are only three options, password, is_super and INSERTACCESS (which really means all access to the identified DB)

Full table level privileges will be arriving in product very soon.