I am aware of this command:
GRANT ALL PRIVILEGES ON database.* TO \'user\'@\'yourremotehost\' IDENTIFIED BY \'newpassword\';
But then it on
To remotely access database Mysql server 8:
CREATE USER 'root'@'%' IDENTIFIED BY 'Pswword@123'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;