Databases

At this moment, Moss supports MySQL databases. From the Databases tab of a server, you can see the databases hosted therein.

Database users

For each database, Moss shows the database users that have permissions on it (if any). But you can also see the whole list of database users in this particular server:

In addition to these regular users that Moss shows, there are two additional ones that always exist:

  • root - The admin of the Moss organization can log into a server as user moss and log into MySQL as the database user root by just running: sudo mysql -u root (no password required). Note that you must be logged into the server to log in MySQL as root.
  • moss - This database user also has administrative privileges. The admin of the Moss organization can log into a server as user moss and log into MySQL as the database user moss by just running: mysql -u moss -p (the password is stored in file /home/moss/.mysql_moss_password). You can use this database user to log remotely into MySQL (but usually you want to do this using a regular database user).

Database connections

When a site connects to a database, it uses a Connection URL of the form mysql://<user>:<password>@<host>:<port>/<database>. Basically, such URL says that a user can connect to a database on a given server using a password. This same concept is a database connection in Moss.

The existence of a database connection means that a database user has permissions on a database. So when you create or set up a connection, Moss grants the corresponding permissions. When you delete the connection, Moss revokes the permissions.

You can either create a new connection from scratch (new database and user) or grant an existing user permissions on an existing database. For the latter, choose a database in a table and enable the corresponding user in the table below, or viceversa:

Finally, you can also see the connections that a given site uses and manage them from the Databases tab of the site.

Did this answer your question?