![]() |
![]() |
|
|
|
|
|
Help Desk > Tutorials > Personal and Group Web Accounts |
Printable Version
|
MySQL 3.23.33 is installed on webpub. To use this database you must first request that a mysql user and database be created for you.
To connect to the MySQL database, you should use the host webpub.allegheny.edu. You will also need your mysql username, password, and database name. This information will be provided by email when your username and database are created, and is also described below.
Your mysql username will be the same as your Allegheny network login name (i.e., your email address without the @allegheny.edu). Your mysql password will initially be your first and last initials followed by #12345. You should change this password the first time you connect to the mysql database. Your mysql database name will be <username>_db. For example, John Smith with Allegheny network logon smithj will have:
mysql username: smithj
mysql password : js#12345
mysql database name: smithj_db
host: webpub.allegheny.edu
You will be given only one MySQL database. You can keep tables from several different projects in the same database, as long as you are careful to use unique table names.
To connect to your database you will need to install a MySQL client on your personal computer. Several clients are available for free from http://www.mysql.com/downloads/index.html (For faster downloads, choose a mirror site!).
A simple Windows client can be downloaded from here. Unzip this file somewhere on your hard drive.
Open a command prompt, change into the mysql directory created by the zip file and type
bin\mysql -u smithj -h webpub.allegheny.edu -p smithj_db
At the "Enter password:" prompt enter the mysql password given above.
Note that you must be online to connect to the MySQL database on webpub.
The first time you connect you should change your password by typing
set password = password("newpassword");
(note: you DO type the quotation marks; replace newpassword with your own new password.) Next time you connect to the database you'll use your new password.
If you are new to MySQL you'll benefit from going through a tutorial, such as the one at
http://dev.mysql.com/doc/mysql/en/Tutorial.html
or you may want to read the excellent book, MySQL, by Paul Dubois (ISBN 0735712123).
Some other resources are:
You should use PHP4 to access your MySQL database through a web page on webpub. Many books and web tutorials are available to help you with the creation of web pages which use PHP to interact with a MySQL database. In particular, the MySQL book by Dubois, mentioned above, has a very good introductory chapter on this. Some other resources are listed below.