Allow mysql remote access


Enable bind address at

/etc/mysql/mysql.conf.d/mysqld.cnf

change bind address to your ip remote or 0.0.0.0 to allow from all

add mysql port to firewall via ufw allow mysql

CREATE USER 'user'@'ip_address' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'ip_address';

If you see %, well then, there’s another problem altogether as that is “any remote source”. If however you do want any/all systems to connect via root, use the % wildcard to grant access:

CREATE USER 'user'@'%' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%';

Finally, reload the permissions, and you should be able to have remote access:

FLUSH PRIVILEGES;