Enabling both local and remote connections to a mysql server on linux (ubuntu)
You can set it to:

bind-address = 0.0.0.0


Which will allow both. "If the address is 0.0.0.0, the server accepts TCP/IP connections on all server host IPv4 interfaces. "

More info: https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_bind-address