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;
Advertisement

Author: susiloharjo

Khoirunnas anfa'ahum linnas A Father, Husband and love to learn person Love my Family, Electronics, Photography, Robot, Dreaming, Programming

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: