University Computing Systems::MySQL Information

Current Versions: MySQL-5.0.45; phpMyAdmin-3.2.2

This page last updated November 12, 2009 20:19 by mysql-request@oak.njit.edu



How to Apply for MySQL Access

Who may have access to MySQL? Any user with a valid UCID may request access to MySQL.

There are various types of databases that may be requested:

  • Personal (ucid)
    Linked to the user's home directory and is meant for personal use.
  • Departmental (dept)
    Reserved for departmental uses and may be requested by NJIT faculty or staff only.
  • Research (rsrch)
    Research databases may be requested by an NJIT faculty or staff sponsor on behalf of a student or student group. A research database should be requested when the space and time requirements for the database exceed the defined "Project" type database below.
  • Club (club)
    Linked to the club home directory. Requests for club databases must come from the faculty advisor to the club.
  • Project (proj)
    Project databases are temporary databases assigned for group projects. A project database will have a 5 MB quota and will expire 135 days ( (15 weeks * 7 days) + 1 month ) after it is created. The requestor is considered the point of contact (POC). Any requests for maintenance or support related to the project database must come from the POC. The POC will begin to receive email notifications 14 days prior to the expiration date on the database so they have opportunity to secure the data if they wish to. Project databases may be requested by anyone having a valid UCID. There is a limit of one project database per UCID.
Requests for MySQL access are made by sending mail to mysql-request@oak.njit.edu.

NOTE: The email you send to mysql-request@oak.njit.edu must :

  • ..include :
    • Your UCID
    • The type of database being requested - e.g, Personal, Project, Department, etc.
      • Example:
        UCID : <your.ucid>
        Type : <your.db.type>
  • ..be sent from a valid NJIT email account. Requests received from an external email address will not be acted on.
  • ..have the Subject: "Request for MySQL Database"
What API's are supported? Currently available API's are:
Interested in JSP or Servlets? University Computing Systems now runs a public Tomcat server. See the following page for details:
Security: Information on securing your MySQL database (applies to personal webpages also) can be found at:
Tutorials: Noteworthy links:
Samples:
MySQL Utilities: Graphical and command line tools for managing your database:
  • Point your web browser at:
    • Our most currently supported release, phpMyAdmin
    • NOTE: Since there are now multiple servers, you will need to select your assigned MySQL server from the "Server Choice" menu of the phpMyAdmin login page.
    • NOTE: You will need to select your database from the "Databases" in the left frame after you log in.
  • If you prefer a command line interface, /usr/local/bin/mysql is available on afs[1-35].njit.edu

    After connecting to afs[1-35].njit.edu via ssh or telnet type the following command to connect:

    mysql -u <mysql username> -p -h <hostname (sql.njit.edu or sql2.njit.edu)> <database name>

    You will be prompted for your password. Use the password that was given to you in email confirmation you received after the database was created.

  • To change your password, connect using the command line method described above. Once connected, type:

    SET PASSWORD = PASSWORD("your new password");

  • Using a .my.cnf file

    MySQL allows you to store connection parameters in an option file. The .my.cnf file, when properly configured, eliminates the need of having specify parameters on the command line.

    Here is a sample of a very simple .my.cnf file:

    [client]
    user = your_ucid
    password = your_password
    host = sql.njit.edu
    port = 3306

    WARNING: Since your home directory is located in AFS at NJIT, it is very important that you understand AFS permissions. For your convenience, a sample ~/.my.cnf file has been created for you and correct AFS permissions have been applied. However, before making any changes to your .my.cnf file, it is important and cannot be stressed enough that you understand AFS permissions.
Debugging PHP If you're starting to use MySQL and PHP for the first time it sometimes seems like something is wrong with the servers. In our experience 99% of the time the problem is hiding in your code. Please attempt the following before you complain about the server; you'll be rewarded by solving the problem faster.
  1. Make sure your login info is correct. Use this PHP webpage to check your MySQL login.
  2. See also this page about debugging home pages.
  3. Turn on the PHP error reporting function.
  4. Run your program with command line php to solve browser-related problems.
  5. You might also take advantage of your instructor's office hours for assistance with debugging your program.
UCS cannot help students debug homework assignments, we may only verify that the systems hosting your homework are functioning.




Please send any questions about the above to:

mysql-request@oak.njit.edu