MariaDB 10.0.25 installs without configuration While trying to install MariaDB on Ubuntu 15.10, I issue command

$ sudo apt-get install mariadb-server


and it outputs

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libmysqlclient18 libterm-readkey-perl mariadb-client-10.0 
  mariadb-client-core-10.0 mariadb-common mariadb-server-10.0 
  mariadb-server-core-10.0 mysql-common
Suggested packages:
  mailx mariadb-test tinyca
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient18 libterm-readkey-perl mariadb-client-10.0 
  mariadb-client-core-10.0 mariadb-common mariadb-server mariadb-server-10.0 
  mariadb-server-core-10.0 mysql-common
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/11.6 MB of archives.
After this operation, 122 MB of additional disk space will be used.
Do you want to continue? [Y/n] y


At the end the installation of packages are completed and the service mysql get installed. But, I never get a prompt/wizard for setting root credentials and other configuration. And later I'm not able to connect to the service

$ mysql -u -root -p
Enter password: 
ERROR 1698 (28000): Access denied for user '-root'@'localhost'


Not able to understand what is going wrong.

UPDATE
What's more intriguing is the following

$ sudo mysqladmin -u root password &lt;myPassword&gt;
$ mysql -u root -p
Enter password: &lt;myPassword&gt;
ERROR 1698 (28000): Access denied for user 'root'@'localhost' 


I'm completely puzzled.
It appears You had some MySQL/MariaDB/Percona instance previously installed, and some of data and config files were left in Your OS.

The way that worked for me on that case (Ubuntu Xenial 16.04 LTS with MariaDB 10.0 installed), with forgotten Maria's root password, was:


purging everything: sudo apt-get purge mariadb*
reboot; it didn't work without it, probably some related service running in background, locking some files from being purged: sudo reboot -h now
installing database once again: sudo apt-get install mariadb-server


Of course this was possible only on private dev machine, without any important data.