If you are using a terminal on Ubuntu using MariaDB; just use --skip-ssl at the end, and you will login
mysql -u root -p database_name --skip-ssl