Instituto Superior Técnico

Serviços de Informática

MySQL (MariaDB)

DSI provides a MariaDB (MySQL fork) database server to all users that are already registered in the Fénix system.

The use of MariaDB’s service requires the knowledge to access this database. For more information, refer to MariaDB’s documentation page.

Activation

To activate the MySQL service, please refer to the following procedure:

  • You should activate the shell service in DSI’s self-service page, in case you don’t have already done it. This step allows the access to the sigma cluster.
  • Now, login (via ssh) to sigma using the username and password from DSI’s centralized authentication system (the same credentials used to access the Fénix system). To do so, execute the following command:
    • ~$ ssh sigma.ist.utl.pt -l [username] , where [username] corresponds to your Técnico ID, for example istxxxxx.
  • Now execute the following command:
    • istxxxxxx@sigmayy: ~$ mysql_reset

This command creates a database with an identical name to the username and a password, which is shown in the screen. Save that password, since it will be needed every time you want to access the database.

Note: In case you have forgotten your password, the mysql_reset command can be executed again. In this case, a new password will be generated, but the database and its content, if they exist, will not suffer any changes.

Access

The database server is running in db.tecnico.ulisboa.pt

To simplify the use of the MySQL service when supporting Web pages running in web.tecnico.ulisboa.pt/sigma, all MySQL clients in sigma are configured to access, by default, the db.tecnico.ulisboa.pt server and not a server running in the localhost, like usual.

Thus, there are 2 options to access the database:

  • To use the default mysql client in sigma, type:
    • istxxxxxx@sigmayy: ~$ mysql -u istxxxxxx -p
    • Enter password: (password generated with the mysql_reset command)
  • To access the database from any machine with an internet connection, you need to have the MariaDB client installed in your computer and specify db.tecnico.ulisboa.pt as server:
    •  ~$ mysql -u istxxxxxx -p -h db.tecnico.ulisboa.pt
    • Enter password: (password generated with the mysql_reset command)

For more information on how to access the sigma cluster, please refer to access to the sigma cluster page.