To install the latest version of MariaDB on Ubuntu, you can follow these steps. Please note that the specific commands may vary based on the version of Ubuntu you are using, so make sure to check for any updates or changes.
1. Update your package list:
sudo apt update
2. Install MariaDB server:
sudo apt install mariadb-server
3. Secure your MariaDB installation:
After the installation, run the following command to secure your MariaDB server. This will prompt you to set a root password, remove anonymous users, disallow remote root login, and more.
sudo mysql_secure_installation
4. Enable and start MariaDB:
sudo systemctl enable mariadb
sudo systemctl start mariadb
5. Verify the MariaDB installation:
You can check the status of MariaDB to ensure that it’s running:
sudo systemctl status mariadb
You can also log in to the MariaDB server with the following command and provide the root password when prompted:
sudo mysql -u root -p
If you can log in successfully, MariaDB is installed and running.
That’s it! You have successfully installed MariaDB on your Ubuntu system. Remember to check the official MariaDB documentation for any additional configuration or updates specific to the version you are installing.