Home > Database > Mysql Tutorial > How to solve the problem of configuring mysql database user permissions in Navicat

How to solve the problem of configuring mysql database user permissions in Navicat

PHPz
Release: 2023-05-27 16:07:50
forward
2752 people have browsed it

    When using a database, you will encounter multiple users and assign user permissions. Some users can only read, some users can read and write, and some users can only operate. For one or more databases, how to set permissions for mysql users? Here I will describe how to use navicat graphical operations to assign user permissions

    • If you use sql grant to assign permissions, refer to MYSQL database management Permission management

    • Basic sql grant command:

    • Assign a user all permissions to a single database: grant all on database name.* to user name@ ’%’ identified by ‘password’;

    • Query database user permissions: show grants for username@’%’;

    1. Create a user

    How to solve the problem of configuring mysql database user permissions in Navicat

    How to solve the problem of configuring mysql database user permissions in Navicat

    Note: The Host configuration is %, which means all IPs can access

    2. Assign permissions to the newly created user

    How to solve the problem of configuring mysql database user permissions in Navicat

    How to solve the problem of configuring mysql database user permissions in Navicat

    How to solve the problem of configuring mysql database user permissions in Navicat

    ##Key points:

    • Adding permissions to the top localhost is valid for all databases

    • Select a single database and click Add permissions, it is valid for all databases The selected database is valid

    For example 1

    Assign a user permission that can only operate the test database

    How to solve the problem of configuring mysql database user permissions in Navicat

    How to solve the problem of configuring mysql database user permissions in Navicat

    For example 2

    The assigned user can only have read permissions and can only query the database

    How to solve the problem of configuring mysql database user permissions in Navicat

    How to solve the problem of configuring mysql database user permissions in Navicat

    mysqlPermissions

    ##Database or tableDelete database or table permissionsGRANT OPTIONDatabase, table or saved programGrant permission optionsREFERENCESDatabase or tableALTERTableALTER TABLE , such as adding fields, indexes, etc.##DELETEINDEXINSERTSELECTUPDATECREATE VIEWSHOW VIEW ##ALTER ROUTINECREATE ROUTINEEXECUTEFILECREATE TEMPORARY TABLESLOCK TABLESCREATE USERPROCESS RELOAD
    Permissions

    Permission Level

    Permissions Description

    CREATE

    Database, table or index

    Create Database, table or index permissions

    DROP


    Table

    Delete data permissions

    Table

    Index permissions

    Table

    INSERT PERMISSION

    Table

    Query Permission

    Table

    Update Permission

    View

    Create View Permission

    View

    View view permission

    Stored Procedure

    Change Stored Procedure Permissions

    Stored Procedure

    Create Stored Procedure Permission

    Stored Procedure

    Execute Stored Procedure Permission

    File access on the server host

    File access permissions

    Server Management

    Create Temporary Table Permission

    Server Management

    Lock table permissions

    Server Management

    Create User Permissions

    Server Management

    View process permissions

    Server Management

    Permission to execute flush-hosts, flush-logs, flush-privileges, flush-status, flush-tables, flush-threads, refresh, reload and other commands

    REPLICATION CLIENT

    Server Management

    Copy Permission

    REPLICATION SLAVE

    Server Management

    Replication Permission

    SHOW DATABASES

    Server Management

    View database permissions

    SHUTDOWN

    Server Management

    Close database permissions

    SUPER

    Server Management

    Execute kill thread permission

    The above is the detailed content of How to solve the problem of configuring mysql database user permissions in Navicat. For more information, please follow other related articles on the PHP Chinese website!

    Related labels:
    source:yisu.com
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template