Comments - Unable to install MariaDB 10.1 on Ubuntu 18.04 after apt remove --purge mysql*

5 years, 10 months ago James Cobban

The only reason that I got into this situation is because after installing MariaDB the first time I was unable to connect to the server even though I was certain I was using the correct password. So I backed out and reinstalled so I could re-enter the root password again. What I did not understand, since this is the first time in 7 years that I have installed either MySQL or MariaDB from scratch as a result of a new OS install, is that the behavior of the root account has changed in the past 7 years. The change was made for excellent reasons but the documentation of the new behavior was buried somewhere in 7 years of accumulated documentation. In old releases one accessed the server by the command "mysql -u root -p", but that has been changed to the more secure "sudo mysql -u root". Because the error message that the mysql client returns is the same one issued for bad password this change in behavior was astonishing. It took me two days of desperately uninstalling and re-installing MariaDB before I found the documentation. Also the installation problem caused ALL apt get install requests to fail because the dpkg update command always failed because of the incomplete installation of MariaDB.

I have everything up and running now but this was a painful experience which I know was unintended.

 
5 years, 2 months ago Faustin Lammler

Hi James, thank you very much for your feedback and sorry for the late reply.

Indeed the default root connection does not need a password anymore and is done through socket, see https://mariadb.com/kb/en/library/security-of-mariadb-root-account/

If your problem is resolved, I invite you to close this question. If not I would be happy to help you resolving your issue.

Regards, Faustin

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.