Using phpMyAdmin

MySQL is a cross-platform, open source, SQL-compliant database server used at CSE for instruction. phpMyAdmin is a PHP-based tool for administering MySQL. This document describes how to use phpMyAdmin to create a MySQL database and to create a new table in that database, for CSE users working with the MySQL service on the Linux machine abstract.cs.washington.edu.

phpMyAdmin will require you to authenticate with your MySQL credentials before you can take any actions. The credentials for your MySQL account should have been conveyed to you before you read this document, but if not, please contact the lab to request them.

phpMyAdmin uses HTTP "basic authentication" to manage login credentials. Because basic authentication passes those credentials unencrypted over the network, we use SSL (HTTPS). The basic URL for phpMyAdmin in Abstract is https://abstract.cs.washington.edu/phpMyAdmin/.

MySQL allows a user to be granted the rights to create databases that match a pattern, and to have full control over those databases (but no others). That makes it possible for you to create your own databases without stepping on the toes of your colleagues. Our model at CSE is to create accounts that allow the users to create databases that consist of the account name as a prefix followed by an underscore. For example, if the database user is farnswrth, that user will be able to create databases with names starting with farnswrth_-- an example would be farnswrth_test.

(The access privilege system for MySQL is rather arcane. For full and gory details, see the Database Administration chapter of the MySQL manual.)

Let's get started. Here is the screen that challenges you to authenticate. Some guy named "rosetest" is about to press "Okay."

A database named rosetest_1 meets the database naming convention, and that's what we are specifying here:

It worked. Let's create a table in rosetest_1 named RubberDucky that will contain three fields:

Here we are specifying column names, data types, and attributes by picking them from lists. Does it get any better than this?

This is what you see after you press "Save." phpPgAdmin shows you the SQL command it emitted to satisfy your request. Aren't you glad you didn't have to type all that in?

You can do a lot more with phpMyAdmin than we have shown you here, but that's all left as an "excercise for the reader." One final note, though: to get back to the main screen, you want to click on the word "Home" under the phpMyAdmin logo near the top of the lefthand frame. That's where you would go to change your password, to create a new database, or perform any other operation that isn't related to the currently-selected database.

This is a draft document. Constructive comments, rants, and flames to the author are solicited.


Scott Rose

$Id: phpMyAdmin_users.html,v 1.3 2007/05/16 20:13:37 rose Exp $