Collections:
Giving Privileges at Server Level in MySQL
How To Grant User Privileges at the Global Level in MySQL?
✍: FYIcenter.com
If you want to grant a user privilege at the global level, you can use the "GRANT privilegeName ON *.* TO userName" command. The argument "*.*" in the command stands for all database and all tables. The following tutorial exercise shows you how to create a new database and grant access privilege to a user on this new database:
>cd \mysql\bin >mysql -u root -pretneciyf mysql> CREATE DATABASE fyi; Query OK, 1 row affected (0.01 sec) mysql> QUIT; >mysql -u dev -piyf mysql> USE fyi; ERROR 1044 (42000): Access denied for user 'dev'@'%' to database 'fyi' mysql> QUIT; >mysql -u root -pretneciyf mysql> GRANT CREATE ON *.* TO dev; Query OK, 0 rows affected (0.00 sec) mysql> QUIT; >mysql -u dev -piyf mysql> USE fyi; Database changed mysql> CREATE TABLE TEST (id INTEGER); Query OK, 0 rows affected (0.09 sec)
⇒ Giving Privileges at the Database Level in MySQL
⇐ Scope Levels of User Privileges in MySQL
2017-08-21, 2215🔥, 0💬
Popular Posts:
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ......
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL...
What Happens If the UPDATE Subquery Returns Multiple Rows in MySQL? If a subquery is used in a UPDAT...
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Serv...
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...