$ sudo apt install mysql-server # Secure the installation (Login doesn't work without this) $ sudo mysql_secure_installation # For temporary remote access, you can unbind MySql Server from 127.0.0.1 by editing the config file $ sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf # Comment out the line bind-address = 127.0.0.1 # By adding # at the beginning $ sudo systemctl restart mysql # Add remote root user. Remove 'WITH mysql_native_password' to use new password encryption $ sudo mysql CREATE USER 'newuser'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES; quit; # Allow MySql through firewall sudo ufw allow from any to any port 3306 # This is dangerous, as you basicly gave a root user access from anywhere. Disable this after you finish, and bind the server to locahhost