0% found this document useful (0 votes)
8 views5 pages

MySQL (MariaDB) Setup on Mercury Guide

This document provides instructions for accessing MySQL (MariaDB) on the Mercury server, including login details and password change procedures. It outlines how to log in via command line, manage databases, and use phpMyAdmin after changing the password. Users are guided on executing SQL commands and managing their database effectively.

Uploaded by

quynhtranglengoc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

MySQL (MariaDB) Setup on Mercury Guide

This document provides instructions for accessing MySQL (MariaDB) on the Mercury server, including login details and password change procedures. It outlines how to log in via command line, manage databases, and use phpMyAdmin after changing the password. Users are guided on executing SQL commands and managing their database effectively.

Uploaded by

quynhtranglengoc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Getting started with MySQL (MariaDB) on Mercury

Your access details


Your user id is your student number preceded by ’s’, such as s1234567.

Your initial password is your birthdate in the format ’ddmmyy’ without the quotation marks.

You can only log in to MySQL once using this password, so you have to change it immediately. You
cannot do this in phpMyAdmin. Here is how to do it on the command line.

Logging in to Mercury from the command line


If you are off campus, log into the VPN first.

On Windows, type ’cmd’ into the search field:

On Mac/Linux/Unix, find the Terminal application.

In Command prompt/Terminal, type


ssh s1234567@[Link]
, but replace the 1234567 with your student number, and press <ENTER>.

You will be prompted:


s1234567@[Link]’s password:
Type your SIMS password (same as for your Swinburne e-mail), not your MySQL temporary
password.

If you cannot access your account after you made sure you are typing it correctly, call 5000 (9214
5000) for a reset.

When you are logged in to Mercury, you’ll see

Logging in to MySQL (MariaDB) on the command line


When you are logged in to Mercury using ssh, type
mysql –u s1234567 –p
and <Enter>.

You will be prompted:


Enter password:
Type your temporary MySQL password. If you see

you are logged in.

Changing the password


Once you are logged in to MySQL (MariaDB), you can change your password by typing
SET SESSION old_passwords=0;
SET PASSWORD = PASSWORD('YourNewPassword');
Working with MySQL on the command line
Once you are logged in, you can issue sql commands and work with MySQL. For individual tasks, this
is entirely adequate as an environment.

Initially, try:
show databases;
You will see ‘information_schema’ (for metadata; you cannot use this) and your own database
‘s1234567_db’. You are not allowed to create databases on MySQL on Mercury. Therefore you use
the database that has been created for you:
use s1234567_db;
You can now create a table and insert some records if you like. To leave MySQL, type
quit
MariaDB says ‘Bye’ and you are back on the command line (ssh) in Mercury. If you type
exit
you arrive back on your home PC/Mac.

Adding data on the command line


You can copy the script of a create statement from canvas (e.g. employees). If you right-click on the
command line when logged into mysql, it will run and create the table.

You can do the same with the Insert script.


Working with phpmyadmin
After you have changed your password on the command line, you can use phpMyAdmin, which is a
MySQL client that is more convenient to use than MySQL (MariaDB) on the command line.

Open a browser and go to: [Link]

You will see the login screen:

All you have to do is remember your user id and new password 


You can now click on your database in the navigation panel on the left side.

You will see the tables that are in your database, if you have any.

Click on the SQL tab on the right-hand side of phpMyAdmin. You can now type or copy-paste SQL
statements. To run them, click ‘Go’ on the lower right corner.

You might also like