┌─────────────────────┐
  │                     │
  │    MySQL/mariadb    │
  │                     │
  └─────────────────────┘


==> If you enter to MySQL as normal user with this command (by entering the root password), everything is fine:
$ mysql -u root -p



==> If no...



######################################################
###########  CONFIG NEW versions of MySQL  ###########
	(debian 11, ubuntu server 20 ...)


# mysql_secure_installation

	Enter current password for root (enter for none):  [ENTER]
	
	Switch to unix_socket authentication [Y/n]  n

	Change the root password? [Y/n]  y

	Remove anonymous users? [Y/n]  y

	Disallow root login remotely? [Y/n]  n

	Remove test database and access to it? [Y/n]  y

	Reload privilege tables now? [Y/n]  y

		Thanks for using MariaDB!


Now, if you enter to MySQL as normal user with this command (by entering the root password), everything is fine:
$ mysql -u root -p





######################################################
###########  CONFIG OLD versions of MySQL  ###########
	(debian 8, debian 9, debian 10 ...) 


# mysql -u root

	USE mysql;
	UPDATE user SET plugin='mysql_native_password' WHERE user='root';
	FLUSH PRIVILEGES;
	exit;



# systemctl restart mysql.service



# mysql_secure_installation

	Enter current password for root (enter for none):  [ENTER]

	Set root password? [Y/n]  y

	Remove anonymous users? [Y/n]  y

	Disallow root login remotely? [Y/n]  n

	Remove test database and access to it? [Y/n]  y

	Reload privilege tables now? [Y/n]  y

		Thanks for using MariaDB!



Now, if you enter MySQL as normal user with this command (by entering the password), everything is fine:
$ mysql -u root -p