Header left.png

Database Services

From Systems Group
Revision as of 15:33, 28 March 2014 by Quentin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

On our MySQL servers, we do not support the LOAD DATA INFILE statement. Them main reason for not supporting the statement is the fact that it requires the MySQL FILE privilege, which is a global privilege and allows the user to access all files in the database directory. As a result, protecting the privacy of user data, we do not provide that privilege.

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.