I believe from my point you haven't run mysql_secure_installation which help to enables and set password base auth for user root.
As you already mention that you follow that link where they haven't set the password for the root user they only create a standard user for their database.
Now how you can solve it all you need to do is run the below commands in order.
First, open the terminal by Ctrl+Alt+T or just search for the terminal.
Take the sudo access by running the below command:
sudo su
It will give you root access to your laptop. you can also avoid taking the root access but for that, you need to run every command using sudo at beginning of every command.
Run the security script with sudo:
sudo mysql_secure_installation
This will take you through a series of prompts where you can make some changes to your MySQL installation’s security options.
Select Y for every option you don't have to worry about anything it's just a just basic configuration of MySQL
once you are done with that now take access to your Mysql server:
sudo mysql -u root -p
The password is which you have set up while running the command of sudo mysql_secure_installation
once you got into the terminal use create a user with all privileges.
for the run the below command:
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';
Warning: Don't run this command on the production server as such broad privileges should not be granted lightly, as anyone with access to this MySQL user will have complete control over every database on the server.
Following this, it’s good practice to run the FLUSH PRIVILEGES command. This will free up any memory that the server cached as a result of the preceding CREATE USER and GRANT statements:
FLUSH PRIVILEGES;
Then you can exit the MySQL client:
exit
In the future, to log in as your new MySQL user, you’d use a command like the following:
mysql -u user-p
The -p flag will cause the MySQL client to prompt you for your MySQL user’s password in order to authenticate.
by coming this far your problem will solve.