![]() Update: The user assigned this permission can modify database table row data.Select: The user assigned this permission can read databases information.Drop: The user assigned this role can remove existing databases and tables.Create: The user assigned this permission can create non-existing databases and tables.Delete: The user assigned this permission can delete database table row data. ![]() Insert: User assigned this permission can insert database table row data.All Privileges: The user assigned this permission can perform all database roles.These user privileges relate to the database actions that the different database users are allowed to perform. The next step is to assign these created database users different roles (user privileges). Create New MySQL Users Grant Privileges to New MySQL User Note that these users are for demo purposes and therefore consider creating stronger database user passwords for your production environment. Let us now create several MySQL database users. If you were using a remote machine/server, then you would have to replace with you want a user that can connect to any MySQL installed system without specifying the hostname or IP address, adhere to the command syntax: CREATE USER IDENTIFIED BY 'your_user_password' The above use case applies to a MySQL installed on a local machine. The command syntax for creating a MySQL user is as follows: CREATE USER IDENTIFIED BY 'your_user_password' Create a New MySQL Userįirst, gain root access to your MySQL database from your Linux terminal using the command: $ mysql -u root -p To demonstrate how to check MySQL user privileges, we will first create different test users with different MySQL privileges. This article guide is ideal for MariaDB, MySQL Enterprise Edition, and MySQL Community Edition users. It is also ideal practice for the database administrator to avoid using the root user to access the MySQL database but instead create another user and grant this user the same access and execution privileges as the root user. Root user access should be reserved to the database administrator who will then use the root user credentials to create database users and grant privileges to execute different database queries. Therefore, it is not ideal for any user that needs access to the MySQL database to gain entry via the root user credentials. The first database transactions/activities are performed by the root user only. The first/fresh installation of a MySQL on any operating system only considers the root user as the default database user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |