Relational databases lab: 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
Open a shell window (a prompt) on the workstation and issue the following command to run the client program mysqlto connect to the database server and issue your SQL statements:
-
mysql -h db-und.ida.liu.se -u <your login name> -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.5.32
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Step 3
You are now ready to create your tables and input your commands to the MySQL server. To test that everything is working correctly you can create a table "test" with an id field. To this end, input the bold text below at the mysql> prompt:
Query OK, 0 rows affected (0.01 sec)
If you get the error message "No database selected," simply input the bold text below into the MySQL prompt:
Page responsible: BDA
Last updated: 2017-01-26