Howto run MariaDB on a Chromebook

Chromebooks are a breed of very portable and easy-to-use laptops with a Linux-based operating system from Google and hardware available from many manufactures. Chromebooks are very popular in the educational sector due to their low price and the effortlessness to use as they require next to no administration and “just works” all the time.

Despite being based on Linux (just like Android is), the Chromebook OS is a very closed down platform. Google ensures the devices are always safe and security updates are automatically installed, while the user just logs in with their Google account and does not have real root access to the devices (again, similar to Android systems).

Chromebook running MariaDB
Chromebook running MariaDB

Turn on Linux in your Chromebook

In May 2018, Google announced they would bring a Linux desktop experience to Chromebooks where users are free to install and run whatever Linux software they want. In July 2018 Google started rolling the new Crostini Linux system out on new devices and since then the feature has landed as a software update in many older devices as well. It is very simple to activate: simply open the Chromebook settings, scroll down to the section titled “Linux” and select “Turn on”. After that, an installation screen will run and once completed, there is a new application icon called “Linux” available, which opens a terminal prompt.

If you are interested in the political and technical challenges the Google team behind Crostini overcame to deliver this, there is an excellent talk given at FOSDEM 2019 that is recommended to watch.

Installing MariaDB Server on a Chromebook

Once the terminal prompt is open, installing MariaDB is very easy: simply run sudo apt install mariadb-server. Since the Linux mode is based on Debian 8 (code name “Stretch”) which shipped with MariaDB 10.1, this command will automatically install the MariaDB Server version 10.1 with all of its dependencies, including among others Galera 3. If Google upgrades the environment to the latest stable Debian 10 (code name “Buster”) then the command will install MariaDB 10.3, as that is available in the newer Debian release.

But why?

As MariaDB is intended for the server setting, why would anybody want to run it on a laptop? Even though MariaDB powers 24/7 major online businesses it is perfectly suitable for small personal projects as well. Having the power of storing and querying data from a real database system is likely benefit anybody anywhere.

Running MariaDB on a Chromebook can come in very handy for anybody wanting to study and learn MariaDB, for example somebody participating in the MariaDB Server University program. Using their Chromebook to learn the way around in the Linux command-line in general is very important for anybody looking for a career in the future IT world.