MySql setup for cs634 and
MySql is running on topcat.cs.umb.edu, a Linux machine. You should be able
to login there now.
The "mysql" command is available to you on sf08 without any special setup.
Also, this mysql server is available to JDBC from anywhere on the Internet.
To provide $cs634 or $cs636 when you are logged in to topcat, edit your
.profile file (anywhere in it) with
cs634=/data/htdocs/cs634; export cs634
cs636=/data/htdocs/cs636; export cs636
This defines an environment variable cs634 or cs636, and $cs634 or $cs636
then evaluates it as needed in commands.
Note that this is in the.profile file, the startup file for "bash", the UNIX
shell descended from the earliest UNIX shells and widely used on Linux.
You can tell bash is in use by the $ prompt.
On Sun Solaris, such as dbs2, we use the "C shell", another branch of UNIX
shell that uses .cshrc as its startup file and % in the prompt.
Luckily, all the important UNIX/Linux commands, such as ls, cd, grep, env,
more, and echo work the same way with both shells.
Note that unlike Oracle, MySql
has no automatic schema per user (this is not required by SQL standard)
so I’ll set up a separate database for each user
UNIX/Linux user joe would get database joedb
you get your own db!
- cs634: later you'll set up your
own mysql server, on its own port, on topcat.
To try out your new database:
1. log into topcat.cs.umb.edu
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.
mysql exit command finishes a session and returns you to the shell prompt.