• ADADADADAD

    mysql新建的用户有什么权限[ mysql数据库 ]

    mysql数据库 时间:2024-12-03 10:28:16

    作者:文/会员上传

    简介:

    mysql新建的用户怎么设置权限1.进入MySQLmysql -u root -p2.创建新用户创建用户名为testuser,密码为123456grant all privileges on *.* to testuser@localhost identified b

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    mysql新建的用户怎么设置权限

    1.进入MySQL

    mysql -u root -p

    2.创建新用户

    创建用户名为testuser,密码为123456

    grant all privileges on *.* to testuser@localhost identified by "123456"

    设置用户testuser,可以在本地访问mysql

    grant all privileges on *.* to testuser@localhost identified by "123456"l

    设置用户testuser,可以在远程访问mysql

    grant all privileges on *.* to testuser@"%" identified by "123456"

    3.设置用户数据库权限

    设置用户只能访问数据库test_db

    grant all privileges on test_db.* to testuser@localhost identified by "123456"

    设置用户可以访问mysql上的所有数据库

     grant all privileges on *.* to testuser@localhost identified by "123456"

    3.设置用户操作权限

    设置用户管理员权限

    grant all privileges on *.* to testuser@localhost identified by "123456" WITH GRANT OPTION ;

    设置用户只有查询操作权限

    grant select on *.* to testuser@localhost identified by "123456" WITH GRANT OPTION ;

    MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,属于 Oracle 旗下产品。MySQL 是最流行的关系型数据库管理系统之一,在 WEB 应用方面,MySQL是最好的 RDBMS (Relational Database Management System,关系数据库管理系统) 应用软件之一。MySQL是一种关系型数据库管理系统,关系数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性 。

    mysql新建的用户有什么权限.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysql