I want to connect to SQL database from a computer that is under a different network, for some reason in the SQL console it tells me that I have a syntax error, I've tried to type it in different ways with no result and I don't see where I'm messing it up
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'mypassword' WITH GRANT OPTION' at line 1 mysql>
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'mypassword' WITH GRANT OPTION' at line 1
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY mypassword WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'mypassword' WITH GRANT OPTION' at line 1
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ipv4 adress from the other computer' IDENTIFIED BY mypassword WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'mypassword' WITH GRANT OPTION' at line 1
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ipv4 adress from the other computer' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
Also, how do I verify if it has connection to the database from the other computer if I don't have access to that computer?