MariaDB is an open-source relational database management system, and it's a popular choice for web applications. In this guide, we will walk through the steps to install MariaDB on Debian 11.

Step 1: Update Your System

Start by ensuring your system is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install MariaDB

Install MariaDB server using the following command:

sudo apt install -y mariadb-server

Step 3: Start and Enable MariaDB

After installation, start the MariaDB service and enable it to run at boot:

sudo systemctl start mariadb
sudo systemctl enable mariadb

Step 4: Secure MariaDB Installation

Run the security script to improve the security of your MariaDB installation:

sudo mysql_secure_installation

This script will prompt you to set a root password, remove anonymous users, disallow root login remotely, and remove test databases.

Step 5: Access MariaDB

You can now log in to the MariaDB shell using the following command:

sudo mysql -u root -p

Enter the root password you set during the secure installation process.

Step 6: Create a New Database (Optional)

If you want to create a new database, use the following commands inside the MariaDB shell:

CREATE DATABASE my_database;
CREATE USER 'my_user'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON my_database.* TO 'my_user'@'localhost';
FLUSH PRIVILEGES;

Replace my_database, my_user, and my_password with your desired database name, username, and password.

Conclusion

You have successfully installed MariaDB on Debian 11. This database system will help manage your application data efficiently.

If you're looking for a reliable hosting solution for your database, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.

For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your needs.

War diese Antwort hilfreich? 0 Benutzer fanden dies hilfreich (0 Stimmen)