use mysql; # 所有用户可登录的username用户登录 create user 'username'@'%' identified by 'userpasswd'; update user set authentication_string=PASSWORD(“密码”) where user="username"; update user set plugin="mysql_native_password" where user="username" ; flush privileges; quit; /etc/init.d/mysql restart;