Hi.
MySQL will automatically start listening on port 3306 (by default) for any connection, both local and remote.
If your firewalls allow traffic through this port, MySQL will pick it up.
Whether it accepts the connection is determined by the domain the user is allowed to connect from.
For example, you can create a local user thusly:
-
GRANT ALL ON someDB.* TO 'Username'@'localhost' IDENTIFIED BY 'password'
-
If this user attempts to connect from anywhere except the local machine the connection will be refused.
This user, however, would be allowed to connect from anywhere on the local network:
-
GRANT ALL ON db.* TO 'Username'@'192.168.%.%' IDENTIFIED BY 'password'
-
Where % is used as a wild-card.
You can specify any IP address or domain name you want, or you can simply use a single wild-card to allow connections from anywhere.
See the official definition of the GRANT statement
here.
Hope this helps.