Connect to an installed mysql db

(Mysql on Ubuntu? I thought this had been replaced in the repos with Mariadb).

You'll notice that you are being asked for a username and password. Did you create one in MySQL? Did you create a database to use? This can seem like a chicken and egg problem (it is). You should start by creating a database aand a user to access it.

I believe the default build of MySQL currently uses so_peer authentication, so you can connect as root without a password using the mysql cli tool:

user@host ~$ sudo mysql
...
mysql > CREATE USER `testuser`@`localhost` IDENTIFIED BY 's3cr3t';
mysql > CREATE USER `testuser`@`%` IDENTIFIED BY 's3cr3t';
mysql > CREATE DATABASE example1;
mysql > GRANT ALL ON example1.* TO `testuser`@`localhost`;
mysql > GRANT ALL ON example1.* TO `testuser`@`%`;
mysql > FLUSH PRIVILEGES;
mysql > quit

In the context above '%' means any IP address. MySQL attaches a special meaning to 'localhost'. It DOES NOT describe the loopback network interface - it means the access is via a filesystem socket. This can cause a lot of confusion.

Usually MySQL comes configured to listen on the filesystem socket and sometimes the loopback interface. You can check this (and indeed if the mysql service is running at all with....

user@host ~$ sudo ss-nlp | grep mysql
u_str  LISTEN     0      128    /var/run/mysqld/mysqld.sock 842576                * 0                   users:(("mysqld",pid=16463,fd=20))
tcp    LISTEN     0      128    127.0.0.1:3306                  *:*

Here I can see that the server is using the filesystem socket at /var/run/mysqld/mysqld.sock and port 3306 on the loopback interface.

The dialog you've shown us above does not obviously accomodate a filesystem socket - so you'll need to use the loopback interface. In order to connect to the network socket, you MUST tell the mysql client the host is at "127.0.0.1", not localhost.