First, log onto the local Mysql server (add the ‘-p’ switch if you have a root password assigned, or ‘-h hostname’ if it’s a remote server):
mysql -u root
Now add the user and update the privileges. To restrict to a single remote IP instead of any, replace ‘%’ with ‘220.127.116.11’, ect.
GRANT ALL PRIVILEGES ON *.* TO remoteuser@'%' IDENTIFIED BY 'remotepassword'; flush privileges;
Comments are closed.