In my case, the LAMP stack is installed on Oracle VM from Ubuntu 18.04
Here is my update for mysql configuration file: /etc/mysql/mysql.conf.d/mysqld.cnf
Before:
bind-address = 127.0.0.1
After:
# bind-address = 127.0.0.1
Make sure your user can access from the remote host. Sudo mysql -u root -p Enter the password, then enter the command
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;
+ ------------------ + ------------------------------ ------------- + ----------------------- + ------------ - + | user | authentication string | plugin | host | + ------------------ + ------------------------------ ------------- + ----------------------- + ------------ - +
| new user | * 9ACA980716AE084BCA56C59D19F3CEB7BB87B139 | mysql_native_password | 192.168.xx | | new user | * 9ACA980716AE084BCA56C59D19F3CEB7BB87B139 | mysql_native_password | local host |
It works for me, good luck.
source share