In version 8 the grant option to allow remote access no longer works and you will get syntax errors if you try to execute that command.
This is what you can do:
- Create the
rootuser (yes, a new user because what exists is ‘root@localhost’ which is local access only):
CREATE USER 'root'@'%' IDENTIFIED BY '123';
- Give the privileges:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';