|

Using A MySQL Database Account
Written by Mel Gorman
Orac runs a MySQL server which any user may get an account for.
By default, it does not exist as not many users require one.
To get one created, mail dbadmin@skynet.ie with a username and preferred password.
The database will be created with the same name as the username except in exceptional circumstances.
The user has full access privilege on the database, including GRANT and DROP so be careful not to accidently drop it.
If the user has access to a GUI SQL client, it may be used from anywhere inside UL but not outside by default.
The user can grant the required privilege if they really need it.
Skynet does not have a GUI SQL client due to the lack of demand and the fact that most college machines do not have an X server.
Hence, this guide will cover the basics for using the command-line mysql client.
To connect to the database client, type mysql -u your_username -p -h orac your_databasename.
The -u switch is for the username, -h is the host the database is running on and -p is so the client asks for a password.
If the password must be entered on the command line, use the -p switch as -pThePassword.
For a full list of switches, type mysql --help or man mysql.
In 99% of the cases with the computer society, the database name will be the same as the username.
Type in the password when requested and the command prompt to the database will be shown like this
mel@skynet:~$ mysql -u mel -p mel
Mysql blah blah
mysql>
From there normal SQL commands may be entered.
There is a number of tutorials on the net related to SQL commands.
A very comprehensive manual to MySQL is available from the MySQL site which covers all the database commands.
If something with the database goes serious wrong be it the password is forgotten or something unusual needs to be set up, mail dbadmin@skynet.ie with a detailed report of what is needed.
|
|