Omega -- Create a Database
Database creation temporarily disabled until a CAPTCHA system is implemented.
Please note this page is in the process of being updated to reflect the addition PostgreSQL, even though there are not yet instructions on how to use PostgreSQL, you can still request a DB, and search online on how to use it.
Creating your own database on Omega is as easy as filling out the following form. Read on to learn how to access and work with your new database once it is created.Step 2
The first thing you need to do once your database is created is change your MySQL password. Do this by issuing the following command, replacing 'new_password' with the desired password:
<username>@omega ~ $ mysqladmin -p password 'new_password'
To access your database using the MySQL frontend, issue the following command. Once you're in, you can issue SQL commands as usual.
<username>@omega ~ $ mysql -p 'your_database_name'
If you are planning on using your database with PHP, you will have to tell your PHP page where the database resides, what username and password to use to connect to it, and what the database is called. Use the following snippet of code to establish a connection:
$linkID = mysql_connect ('localhost', 'your_username', 'your_mysql_password'); mysql_select_db ('your_database_name', $linkID);
A simple class that demos the most common MySQL functions and handles simple errors is here. Browse through the code to learn the basics about connecting and disconnecting, and issuing queries.
Finally, if you are planning on using your database with Perl, read through the following tutorials to find out how.
Introduction to MySQL (using Perl DBI)
DBI - The Perl Database Interface
Official MySQL Tutorial
Questions, problems, comments? Email us!