Installing and configuring MySQL (MariaDB)
MySQL installation
MySQL is a free relational database management system.
First, update the system package and repository lists:
Â
Add the MariaDB repository:
Â
Install MariaDB:
Â
Next, start the client using the following command:
Â
The ";" character is required in SQL queries!
Select the MySQL system database:
Â
Create the first user:
Â
Now create a database:
Â
Use the following two commands to grant the user access to the database:
Â
Opening the database for external access:
If you need to connect to MySQL from a host other than localhost, edit /etc/mysql/my.cnf and find the bind-address line so that it looks as follows:
Â
Restart MySQL: