PROXY (admin) - allows logging in as another user. PROCESS (admin) - allows accessing the information about the threads (processes) executing on the server. It declares the location of database objects on the physical media and is used to optimize the database system.ĬREATE USER (admin) - allows you to create/change/rename/delete database users. This space itself is logical and is not related to the database structure or schema. SHOW VIEW - allows you to check what kind of query (which data consists of) a certain view is created, defined with the help of CREATE VIEWĬREATE ROUTINE - allows you to create a procedure, which is a set of SQL commands.ĪLTER ROUTINE - allows you to modify a procedure created by CREATE ROUTINE.ĮXECUTE - allows you to call prepared procedures.įILE - gives you read access to any file on the server that MySQL itself has access to, and access to create a file in directories that MySQL has write access to.ĬREATE TABLESPACE (admin) - allows you to create/modify/delete tablespaces. For example, in this view you can collect certain grouped data from three tables (by SELECT operator) and in fact the collected data will only refer to the data of these 3 tables and will also be a union that does not need its own table. The indexes themselves are assigned manually and allow you to save time searching for rows.ĬREATE TEMPORARY TABLES - allows you to create temporary tables for the session time.ĬREATE VIEW - allows you to create some view in the form of a table that does not actually exist as a single one and contains only data from other tables. INDEX - the privilege gives the right to add/remove indexes to (from) tables. TRIGGER - allows you to create/modify/delete triggers (linked to certain tables) that perform additional actions during DELETE, UPDATE or INSERT operations. REFERENCES - allows you to create links between tables by an external key.ĮVENT - allows you to create/modify/delete tasks for the scheduler LOCK TABLES - locks the table for the time it is being artificially changed (administration) so that the data inside it cannot change in its natural way (during the workflow). It is possible to give/reject only those rights that the assignor himself has. GRANT OPTION - allows you to assign specific rights to a certain user (also select). SELECT - allows reading (outputting rows) from tables using selections by columns and/or by some arithmetic and logical criteria. Not to be confused with ALTER, which allows you to change the table structure itself (number of rows/columns, column types).ĭELETE - opposite to INSERT - allows you to delete rows from a table.ĪLTER - allows you to change the table structure. UPDATE - allows you to change the content of table rows. INSERT - allows you to add rows to a table. Full information about rights/privileges is available in the MySQL developer documentation:ĬREATE - allows you to create new databases and tablesĭROP - allows you to delete databases or tables The latter privileges are admin-level privileges, which are explicitly stated for reference only. There are a number of privileges in the MySQL database system listed below with a description. In addition, it is fast, reliable and, most importantly, easy to use DBMS, quite suitable for not too global projects. Mysql is a freely distributed system, i.e. Access to any database itself can be assigned by the administrator (or an authorized user) to another user, and it can be full or to some extent limited.Īll data in its databases are stored in the form of logically connected tables, access to which is carried out with the help of query language SQL. So that other databases are not available to absolutely every user on the server, there is a system of users for these databases. SELECT host, user, password FROM mysql.MySQL databases* are an entity for storing information in the form of tables. GRANT ALL PRIVILEGES ON dbname.* TO privileges Grant permissions to user ( Single database ) use dbname.* to restrict the user to a single database and dbname.tablename to restrict both the database and a table. GRANT ALL PRIVILEGES ON *.* TO 1 *.* means all databases and all tables. Grant permissions to user ( All databases ) can be used if mysql is only accessed from the same server that’s running the script. Mysql> CREATE DATABASE IF NOT EXISTS your_database_name Add UserĬREATE USER IDENTIFIED BY equals localhost eg.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |