创建本机用户:insert into mysql.user(Host,User,Password)valuse("127.0.0.1","stu"password("123"));赋予权限:grant all privileges on *. * to 'stu'@'127.0.0.1'identified by '123';
其中dba是用户名,192.168.3.%是要登录这个用户的那台电脑的网段,如果是本地就用127.0.0.1就好。在mysql5.7中要先建立用户在授权。也就是说你的应该如下:create user 'stu'@'127.0.0.1' identified by '123';grant replication slave on *.* to stu@'127.0.0.1';flush privileges;