|
TheCAT now has a dedicated database server machine for general student/faculty/staff usage.
Currently we are running MySQL 5 and PostgreSQL 8.1.x.
If you already have a Maseeh College account (CS Unix, ECE Unix, Linux or Windows) you can get a MySQL and/or PostgreSQL account by presenting yourself and user ID to one of our front desks
[locations and map here]
Policies
- Accounts are given on a username basis so we can track which user has which database. So this means your database will be the same as your username
- Passwords are separate from your other accounts
- Forgotten passwords: come to one of our front desks and request a password change
- You cannot log directly into db.cecs.pdx.edu
- You can only access db.cecs.pdx.edu directly from a *.pdx.edu machine. From outside PSU please use the web interface
- Take care with your password. If you use it in a script, make sure the file and directory are not world readable.
Backups are happening on a nightly basis. Contact support if you need a restore. Please let us know what table you want restored or if you want your whole database restored.
MySQL Access Information
Information you need to access MySQL
Username: your Maseeh College username
Dbname: same as username
Password: as given to you
Hostname: db.cecs.pdx.edu
Port: 3306 (default port for MySQL)
MySQL from the command line/shell
Available from CS unix and linux accounts. For CS unix you will need to add the MySQL package (details on adding packages here).
In linux mysql should already be in your path (/usr/bin/mysql).
The command:
mysql -h db.cecs.pdx.edu -u username -p
will connect you to your database.
Mysql from phpMyAdmin
phpMyAdmin allows MySQL database access administration over the web. You can run queries, create/drop/alter tables, delete/edit/add fields etc.
Go to https://www.cat.pdx.edu/phpMyAdmin/
Enter your username and MySQL password. You will then be presented with your database.
Other MySQL clients (for personal install)
Mysqlgui - windows and *nix clients
How to Change Your MySQL Password
To change your password, connect to db.cecs with your favorite MySQL client and run the following SQL query, substituting newpassword with your new password
set password = password('newpassword');
PHP and MySQL
Information on connecting to MySQL from PHP can be found here on the PHP website
All Maseeh College webservers include these PHP functions
Perl and MySQL
Perl DBI installed on unix systems with MySQL access
the command "perldoc DBD::mysql" should get you the perldoc.
Check the main DBI site for docs and tutorials: http://dbi.perl.org/index.html
usage in a perl script:
use DBI;
use DBD::mysql;
MySQL Manual and Other Resources
Manual available locally at http://www.cat.pdx.edu/manuals/mysql/ or on the MySQL website
PostgreSQL Access Information
Information you need to access PostgreSQL
Username: your Maseeh College username
Dbname: same as username
Password: as given to you
Hostname: db.cecs.pdx.edu
Port: 5432 (default port for PostgreSQL)
PostgreSQL from the command line/shell
Available from unix and linux accounts. For unix you will need to add the PostgreSQL package (details on adding packages here ).
In linux psql should already be in your path (/usr/bin/psql).
The command:
psql -h db.cecs.pdx.edu databasename
will connect you to your database.
PostgreSQL from phpPgAdmin
phpPgAdmin allows PostgreSQL database access administration over the web. You can run queries, create/drop/alter tables, delete/edit/add fields etc.
Go to https://www.cat.pdx.edu/phpPgAdmin/
Enter your Maseeh College username and PostgreSQL password. You will then be presented with your database.
How to Change Your PostgreSQL Password
To change your password, connect to db.cecs with your favorite PostgreSQL client and run the following SQL query, substituting newpassword with your new password and username with your Maseeh College username
ALTER USER username WITH PASSWORD 'newpassword';
PHP and PostgreSQL
Information on connecting to PostgreSQL from PHP can be found here on the PHP website
All Maseeh College webservers include these PHP functions
Perl and PostgreSQL
Perl DBI/DBD installed on unix systems with PostgreSQL access
the command "perldoc DBD::Pg" should get you the perldoc.
Check the main DBI site for docs and tutorials: http://dbi.perl.org/index.html
usage in a perl script:
use DBI;
use DBD::Pg;
PostgreSQL Manual and Other Resources
Manual and documentations available from the main PostgreSQL site at http://www.postgresql.org/
|