MySQL is a free and open-source relational database management system (RDBMS).

To begin, let's update the system's package lists and repositories:

sudo apt-get -y update && sudo apt-get -y dist-upgrade

Next, we'll add the MariaDB repository:

curl -sS | sudo bash

Now, let's install MariaDB:

sudo apt-get -y install mariadb-server

To activate the program, use the following command:

mysql -u root -p

The ";" symbol is mandatory in SQL queries!

Choose MySQL:

USE mysql;

Create the first user:

CREATE USER 'spacecore'@'localhost' IDENTIFIED BY '123456';

Now, let's create a database:


Grant the user access to the database using two commands:

GRANT ALL PRIVILEGES ON server.* TO 'spacecore'@'localhost' WITH GRANT OPTION;

If you need to connect to MySQL from outside localhost, you'll need to edit /etc/mysql/my.cnf and find the bind-address line, which should look like this:

#bind-address =

Restart MySQL:

service mysql-server restart