Skip to content

MYSQL

Database clients

You can connect to the database using any of the available tools for this task: the mysql console client[*], MySQL Workbench (a GUI interface officially supported by ORACLE), or any other 3rd party tools (such as phpMyAdmin). If you are using Windows, you can alternatively connect via ssh to lxplus, aiadm or any other machine using for instance putty, and then follow the following instructions.

All our documentation assumes the use of the standard console client. Be sure you are using an up to date version which matches (or is newer than) your database server version in order to have access to all the required functionalities.

[*] Please notice that there is no need to sign up to get the rpms, just follow the link "No thanks, just start my download."

Connecting to the database

To connect to your database, as administrator, using the CLI tool, type the following:

mysql -h <ip-alias> -P <port> -u admin -p

We will provide you with this information, along with your initial password, when your instance is created.

Note:

The admin account we provide you with is set as expired, requiring you to reset the password before being able to perform further operations.

You need to use a client supporting expired accounts (versions greater than 5.6.7) to perform this first operation.

From lxplus or aiadm, you can get access to a MySQL 8.0 client, and therefore change the initial password:

[xxx@lxplus953 ~]$ mysql --version
mysql  Ver 8.0.32 for Linux on x86_64 (Source distribution)

[xxx@lxplus953 ~]$ mysql -h dbod-xxx --port=55xx  -u admin -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 8.0.35

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> ALTER USER 'admin'@'%' IDENTIFIED BY 'your_new_password';
Query OK, 0 rows affected (0.01 sec)

Now you should be able to see the existing databases:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
...
+--------------------+
5 rows in set (0.00 sec)

User management

The owners of the database (user and defined admin e-group) are considered the database administrators (DBAs). Two special DB users exist in the instance: dod_mysql and dod_dbmon. The DBA must not change any parameter related to these two users as they are used for management and monitoring purposes. Any modification affecting these users could interfere with the correct behaviour of the platform, and will be considered a break of the user agreement.

As a DBA, the owner will have the ability to grant access to new users and manage their access privileges. For further information about how to correctly manage user privileges and accounts, have a look at the MySQL 8.0 Access Control and Account Management documentation.

For any question regarding the management of the DB instance, please read the official MySQL 8.0 Reference Manual.