MySql Setup

MySql setup for cs630 and cs636.

MySql is running on, a Linux machine. You should be able to login there now.
The "mysql" command is available to you on topcat without any special setup.
Also, this mysql server is available to JDBC from anywhere on the Internet.

To provide $cs630 or $cs636 when you are logged in to topcat, edit your .profile file (anywhere in it) with

export cs630=/data/htdocs/cs630
export cs636=/data/htdocs/cs636

This defines an environment variable cs630 or cs636, and $cs630 or $cs636 then evaluates it as needed in commands.

Added Note: many students have no .profile file in their home directories (those with relatively new accounts). You can see its contents if it has anything in it using the UNIX cat command, which just echoes the contents verbatim:

cat .profile

Here is the response in the case the file .profile does not exist:

cat: .profile: No such file or directory

In that case, you can create a new .profile file easily in your home directory with the command (for cs630):

cat > .profile
export cs630=/data/htdocs/cs630

Here <control-D> is input by holding down the Ctrl key and typing d. Here the cat command is reading the keyboard for input and outputting it. Because of the redirection "> .profile", the output is put in the file .profile.

More on MySql itself

Note that unlike Oracle,   MySql has no automatic schema per user (this is not required by SQL standard)

To try out your new database:
1. log into
2. Use the mysql command, for example, like this for user joe:

mysql -u joe -Djoedb -p

You should see the mysql> prompt, where you can use SQL. Create a table and insert a row into it to test your account.

The mysql exit command finishes a session and returns you to the shell prompt.