GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.4.2' IDENTIFIED BY '123456' WITH GRANT OPTION;
如果出现错误“Your password does not satisfy the current policy requirements”
执行:set global validate_password_policy=0;
返回Query OK, 0 rows affected (0.00 sec)后重新执行上句
返回Query OK, 0 rows affected, 1 warning (0.02 sec) 后,执行下句
flush privileges;