MySQL/MariaDB Resource Web Pages

CSC instructors can request MySQL accounts for their classes by sending an email to csc_help@ncsu.edu. Include: course, section number. If you want accounts for your TAs please include their name(s)with their unity IDs.

IMPORTANT: Students are responsible for their own database backups. Also, MySQL accounts are permanently deleted at the end of each semester.

How To's


Logging in to the MySQL Class Server

statements that you need to enter are in bold or in red. When the prompt “MariaDB[(none)]>” is returned, your MySQL login was successful! IMPORTANT: access to this MySQL server is restricted to campus IPs only and/or via vpn.ncsu.edu

  1. You need an ssh client. We recommend Putty. For Mac users use the Terminal app.
  2. Launch your ssh client and open a secured connection to the remote host: remote.eos.ncsu.edu.
  3. login: <enter your Unity ID>
  4. Password: <enter your Unity password>
  5. eos% /mnt/apps/public/CSC/Mysql-Shell/bin/mysql -u your_mysql_acct -p -h classdb2.csc.ncsu.edu (replace your_mysql_acct with your assigned mysql acct which would match your unity ID)
    • Note: You can add an alias for the above command using the following steps -
      • Edit the file ~/.bash_profile and add the line alias mysql="/mnt/apps/public/CSC/Mysql-Shell/bin/mysql"
      • Save the file, then either open a new Terminal tab, or quit and relaunch Terminal, or refresh the changes by typing source ~/.bash_profile
      You can just type "mysql" instead of "/mnt/apps/public/CSC/Mysql-Shell/bin/mysql" for step 5 now.
  6. Enter password: (this is NOT your unity password. Check with your TA and/or instructor about the assigned password)
    MySQL Shell 8.0.25
    Copyright (c) 2016, 2021, Oracle and/or its affiliates.
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
    Other names may be trademarks of their respective owners.
    Type '\help' or '\?' for help; '\quit' to exit.
    Creating a session to 'uid@classdb2.csc.ncsu.edu'
    Fetching schema names for autocompletion... Press ^C to stop.
    Your MySQL connection id is xxxxx
    Server version: 10.5.22-MariaDB MariaDB Server
    No default schema selected; type \use to set one.
    MySQL classdb2.csc.ncsu.edu:3306 JS >

  7. At the MySQL classdb2.csc.ncsu.edu:3306 JS > prompt type \sql This will switch your command line to SQL instead of JS.
  8. To exit the command line, type \q and press Enter.

Changing your MySQL Password

Important: We highly recommend users to change their MySQL passwords ASAP!

  • Login to your MySQL acct as explained above.
  • MariaDB [(none)]> SET PASSWORD = password('bla'); replace bla with your new password. Contact csc_help@ncsu.edu to request password reset.

Connecting from Eclipse

Connecting from Eclipse Instructions. (Instructions are under Review)