Install MariaDB on Ubuntu 20.04 LTS
sudo apt updatesudo apt install mariadb-serversudo mysql_secure_installation
Access Database from outside
Open /etc/mysql/mariadb.conf.d/50-server.cnf
and change the bind-address
to:
...bind-address = 0.0.0.0...
Create Administrative User
- Create a new user
newuser
for the hostlocalhost
with a newpassword
:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
- Grant all permissions to the new user
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
- Update permissions
FLUSH PRIVILEGES;