For advanced users, you can use MySQL 5.0+ for this application. When setting up a database for access, you may follow the below SQL commands which creates a database and a user who may access the database from any remote connection:
- DROP DATABASE IF EXISTS <database>;
DROP USER IF EXISTS <database>@'%';
CREATE DATABASE <database> CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER <database>@'%' IDENTIFIED BY '<password>';
GRANT ALL ON <database>.* TO <database>@'%' IDENTIFIED BY '<password>';
Now, let MySQL monitor outside IP addresses.
- sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
- Change bind-address from 127.0.0.1 to the following
- # Instead of skip-networking the default is now to listen only on
- # localhost which is more compatible and is not less secure.
- bind-address = 0.0.0.0
- Change bind-address from 127.0.0.1 to the following
- sudo systemctl restart mysql