In my case, installed LAMP stack on Oracle VM of Ubuntu 18.04
Here's my updateto mysql config file: /etc/mysql/mysql.conf.d/mysqld.cnf
Before:
bind-address = 127.0.0.1
After:
# bind-address = 127.0.0.1
# comment out bind-address to test remote access
Ensure your user can access from remote host
sudo mysql -u root -p
Enter your password, then issue the command
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;
+------------------+-------------------------------------------+-----------------------+--------------+
| user | authentication_string | plugin | host |
+------------------+-------------------------------------------+-----------------------+--------------+
| newuser | *9ACA980716AE084BCA56C59D19F3CEB7BB87B139 | mysql_native_password | 192.168.x.x |
| newuser | *9ACA980716AE084BCA56C59D19F3CEB7BB87B139 | mysql_native_password | localhost |
This works for me, good luck.