TDDD37 Database Technology
Setting up your MySQL environment
Step 1:Know the password for accessing your MySQL account.
Normally the account will be created for you when you register for the course and you are notified via e-mail. If you have a MySQL account from a previous course, this MySQL account is to be used also for this course.
If you have forgotten your password, contact IDA's technical staff TUS. The lab assistant cannot help you with password issues.
Step 2:
Log in on a Sun terminal and type the following in a shell window:
-
module initadd office/mysql
module load office/mysql
Step 3:
Prepare to install the Jonson Brothers database tables.
Download the scripts company_schema.sql and company_data.sql to your current directory.
Step 4:
Open a shell window on the SUN workstation and issue the following command to run the client program mysql to connect to the database server and issue your SQL statements:
- mysql -h db-und.ida.liu.se -p <your login
name>
-
Enter password: ********
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 110096 to server version: 5.0.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Install the Jonson Brothers database in your database account. You only need to do this once. The tables will be available after you log out and in again.
In the mysql> prompt type the bold text below:
mysql> source company_schema.sql
Query OK, 0 rows affected (0.01 sec)
...
Query OK, 0 rows affected (0.07 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> source company_data.sql
Query OK, 25 rows affected (0.01 sec)
Records: 25 Duplicates: 0 Warnings: 0
...
Query OK, 0 rows affected (0.00 sec)
If you have more questions please consult our FAQ or ask your lab assistant.
Query OK, 0 rows affected (0.01 sec)
...
Query OK, 0 rows affected (0.07 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> source company_data.sql
Query OK, 25 rows affected (0.01 sec)
Records: 25 Duplicates: 0 Warnings: 0
...
Query OK, 0 rows affected (0.00 sec)
If you have persistent log in problem, please send email to helpdesk@ida.liu.se reporting the error message you obtained.
Page responsible: Fang Wei-Kleiner
Last updated: 2012-09-07
