|
|
Getting Started with MySQL on the UM Research
Server
The MySQL relational database management system
is installed on willow, for the instructional and research use of
University of Mississippi faculty and students.
- What version of MySQL is installed on
willow, and where is it located?
- What environment variable settings
are necessary to bring up a MySQL session on willow?
- How can I launch a MySQL
session?
- How can I exit MySQL?
- How do I select a database for use?
- How can I see what tables are
available within my database, and/or what columns are
defined for a particular table within the database?
- How can I use MySQL in batch mode, and
why would I want to?
- How can I get a MySQL account on
willow?
- Where can I learn more about how to
use MySQL?
- Is there a simple, read-only database available on willow that I can let my students query for instructional purposes?
Frequently Asked Questions and Answers about
MySQL on the UM Research Server
What version of MySQL
is installed on willow, and where is it located?
MySQL 4.0.11, located in /usr/local/mysql (which is a
symbolic link pointing to
/usr/local/mysql-standard-4.0.11-gamma-sun-solaris2.8-sparc)
What
environment variable settings are necessary for me to
run a MySQL command-line session?
If you want to launch a MySQL session from your current
directory, you must either:
Include the full pathname when
running the MySQL program:
>
/usr/local/mysql/bin/mysql
or
Ensure that your PATH environment
variable includes the directory:
/usr/local/mysql/bin
For more information on setting environment
variables in general, and the PATH variable in
particular, see UNIXhelp
for Users: Managing your Environment.
back to top
How can I launch
a MySQL session?
> mysql -u
<your_mysql_account_id> -p
Substituting your actual MySQL account id for
<your_mysql_account_id>.
NOTE: Your MySQL account id and password are
separate account from your Unix account that you use to
login to willow.
For example, if you user id is "rocky" and your
password is "racoon1", and your PATH
environment variable is set as described above, you would
start MySQL as follows:
> mysql -u rocky -p
Enter password: racoon1
(your password will not show up when typed)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.11
Type 'help;' or '\h' for help. Type '\c' to clear the
buffer
mysql>
If you do not know the class MySQL account name and password, see your instructor.
back to top
How can I exit MySQL?
You can disconnect any time by typing QUIT
at the mysql> prompt:
mysql> QUIT
Bye
You can also disconnect by pressing Control-D.
back to top
- How do I select a database for use?
You will likely be granted use for only one database on
willow. Before you can query or manipulate any tables
within your database, you must select it. If, for
instance, your database was called instruct, you would
select it for use as follows:
mysql> USE instruct;
Database changed
back to top
- How can I see what tables are
available within my database, and/or what columns are
defined for a particular table within the database?
Once you have selected your database for use:
mysql> show tables;
mysql> describe
<tablename>;
For more information, see the MySQL
Tutorial.
back to top
- How can I use MySQL in batch mode, and
why would I want to?
See the MySQL
Tutorial: Using mysql in Batch Mode
back to top
- How can I get a MySQL account on
willow?
UM Instructors may request class accounts by emailing
their electronic class rolls to assist@olemiss.edu.
For individual users who already have willow
accounts, MySQL account requests will be considered
on a case-by-case basis, and should also be made to assist@olemiss.edu.
back to top
- Where can I learn more about how to
use MySQL?
In general, see the MySQL
Reference Manual. In particular, see the MySQL
Tutorial. Also, from a MySQL session:
mysql> help;
back to top
- Is there a simple, read-only database available on willow that I can let my students query for instructional purposes?
Yes. The EMP employee database
is available in MySQL database instruct on willow. Email assist@olemiss.edu to negotiate read access for your class.
back to top
|