Header left.png

Database Services

From Systems Group
Revision as of 13:54, 15 January 2016 by Jacob (Talk | contribs)

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.

Oracle Database

CS Department users can get access to an Oracle 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 oracle.cs.odu.edu. Once you have a database you can access it through Windows and UNIX.

UNIX Login

  1. Login to one of the Linux and Unix servers
  2. At the prompt type source /usr/local/bin/coraenv
  3. When prompted for ORACLE_SID, type the SID provided to you by the administrators.
  4. For ORACLE_HOME choose /home/oracle.
  5. At the prompt type sqlplus xxxx@ZZZZ, where xxxx is the username and ZZZZ is the SID for your Database.

Windows Login

  1. Login to either a Lab machine or VCLAB
  2. Go to C:/sqldeveloper
  3. Run sqldeveloper.exe
  4. Choose a custom connection name, enter the username and password for the Database, for hostname choose oracle.cs.odu.edu nad enter the proper SID.
  5. Press connect.

MongoDB Database

CS Department users can get access to a MongoDB database upon request. Users are granted the builtin readWrite role on their own database, as well as a custom changeOwnPassword role that allows them to change their password.

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