Header left.png

Database Services

From Systems Group
Jump to: navigation, search

The ODU CS Department provides faculty and students with the ability to access a database for use with their projects. We offer both MySQL and Oracle databases.

MySQL Database

CS Department users can get MySQL database upon request.By default,users get the following the privileges: SELECT, CREATE TEMPORARY TABLES, ALTER, UPDATE, CREATE, DROP, INSERT, INDEX, DELETE, EXECUTE, CREATE ROUTINE, ALTER ROUTINE, LOCK TABLES

The name of the database server is mysql.cs.odu.edu. You cannot access this server directly from across the Internet. Instead, please log in to one of the Linux and Unix servers, and then SSH connect to the mysql server from there.

The LOAD DATA INFILE Statement

Our MySQL servers do not support the LOAD DATA INFILE statement because it requires granting MySQL FILE privilege (a global privilege). When MySQL FILE privilege is granted, all database users have access to all files in the database directory and the privacy of user data is jeopardized. To protect user data privacy, we do not grant MySQL FILE privilege, and therefore cannot support the LOAD DATA INFILE statement.

The following excerpt from mysql.com presents the definition of the FILE privilge in version 5.1 (current CS MySQL server version):

" The FILE privilege gives you permission to read and write files on the server host using the LOAD DATA INFILE and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. A user who has the FILE privilege can read any file on the server host that is either world-readable or readable by the MySQL server. (This implies the user can read any file in any database directory, because the server can access any of those files.) The FILE privilege also enables the user to create new files in any directory where the MySQL server has write access. As a security measure, the server will not overwrite existing files."

There are other security reason involving the MySQL LOAD DATA INFILE statement that can be further referenced at http://dev.mysql.com/doc/refman/5.1/en/load-data-local.html Please e-mail root@cs.odu.edu with any further questions.

MongoDB Database

A MongoDB server is provided for CS Department users, request can be granted upon request via email to root@cs.odu.edu.

This server is using MongoDB 4.2, it is best to use the same version of mongo client connecting. C

Users will be granted the following roles "readWrite" and "changeOwnPassword"

Linux Login

  1. Login to one of the Linux and Unix servers
  2. At the prompt type mongo mongodb.cs.odu.edu -u username -p --authenticationDatabase username
  3. Enter your password when prompted

Changing your mongodb user password

Users are given the ability to change their password in the mongo shell with the "changeOwnPassword" role, This can be done as follows: (values in <> are meant to be changed)

use admin db.updateUser("<username>", { pwd: "<newPassword>" })