/etc/mysql/mysql.conf.d/mysqld.cnf
# bind-address = 127.0.0.1
update localhost to %
SET PASSWORD FOR 'root'@'%' = PASSWORD('newpassword');