开发者社区 问答 正文

MySQL如何添加额外管理员?

MySQL如何添加额外管理员?

展开
收起
真的很搞笑 2021-11-07 09:07:12 431 分享 版权
1 条回答
写回答
取消 提交回答
  • "# 添加额外管理员,system作为管理员,oldsuo为密码 mysql> delete from mysql.user; Query OK, 2 rows affected (0.00 sec) mysql> grant all privileges on . to system@'localhost' identified by 'oldsuo' with grant option; Query OK, 0 rows affected (0.00 sec)

    刷新MySQL的系统权限相关表,使配置生效

    mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> select user,host from mysql.user; +--------+-----------+ | user | host | +--------+-----------+ | system | localhost | +--------+-----------+ 1 row in set (0.00 sec) mysql>"

    2021-11-07 10:00:00
    赞同 展开评论