添加用户如下:
添加一个本地用户,名为username密码为password
GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
添加一个远程用户,名为username密码为passwordGRANT ALL PRIVILEGES ON *.* TO username@"%" IDENTIFIED BY 'password' WITH GRANT OPTION;
添加完用户后要重新启动mysql服务,或是执行如下语句更新flush privileges
没有评论:
发表评论