Using MySQL

MySQL is a very popular, open source database which provides an excellent backend for PHP, Perl, and Python scripts. Accounts for using MySQL are available to university affiliated departments, offices, and organizations as well as faculty and staff.

The purpose of this document is not to explain how to write MySQL - for documentation on MySQL commands, go to Instead, it is intended as a guide to getting started with MySQL at Binghamton University.

Requesting a MySQL Account

To use MySQL you will need a MySQL account. Requests should be sent to John Hagan. Separate MySQL accounts will not be created for every database project developed by a particular person or group. Multiple projects can use the same database; however, the developers should make sure to use a unique table prefix for each project so that they don't corrupt any other tables which might be present.

Accessing MySQL

Once your MySQL account is established, you will need to follow a few steps to access your database. Under most circumstances, access to your MySQL account is restricted to the localhost. This means that you will only be able to connect to the database from the server on which it resides. Since the MySQL database will be created on the same server which houses your web account, your PHP, Perl, and Python scripts should specify the MySQL connection host as 'localhost'. You can manage your database tables remotely by using phpMyAdmin. Instructions on accessing this popular web tool will be give to you when your MySQL account is created.

Last Updated: 8/13/14