Mariadb Setup

MariaDB SQL Database

MariaDB Cheat-Sheet

1
2
3
sudo apt update
sudo apt install mariadb-server
sudo mysql_secure_installation

Open /etc/mysql/mariadb.conf.d/50-server.cnf and change the bind-address to:

1
bind-address = 0.0.0.0
  1. Create a new user newuser for the host localhost with a new password:
1
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
  1. Grant all permissions to the new user
1
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
  1. Update permissions
1
FLUSH PRIVILEGES;