- Log in to your MySQL first
Mysql-uroot-p
- The following message appears after successful login
Welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connectionIDIs8Server Version:5.1. the-Log Source distributioncopyright (c) -, -, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'ToClearThe current input statement.mysql>
And then enter
' Root '@'%'password ' with GRANT OPTION;
Root can be changed to you to add remote access rights of the user,% for any IP, you also changed to fixed IP, then your user can only that IP login, as for password is remote login password!!
- OK, test it, open up your GUI tools, for example Navicat.
MySQL adds remote connection permissions to users