0% found this document useful (0 votes)
53 views7 pages

RNB Global University Practical File

This document contains a practical file for the subject "Database Administration with MySQL". It lists 12 practices for performing various user, permission and password management tasks in MySQL such as creating and dropping users, granting permissions on databases and tables, and changing passwords. Each practice includes the required syntax for the MySQL command.

Uploaded by

Komal Samdariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views7 pages

RNB Global University Practical File

This document contains a practical file for the subject "Database Administration with MySQL". It lists 12 practices for performing various user, permission and password management tasks in MySQL such as creating and dropping users, granting permissions on databases and tables, and changing passwords. Each practice includes the required syntax for the MySQL command.

Uploaded by

Komal Samdariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

RNB GLOBAL UNIVERSITY

PRACTICAL FILE

Name:-Komal Samdariya
Roll No:-1719001007
Subject Name- Database Administration with MySQL
Course Code-19009300
Faculty Name-Ms. Zaiba Khan

Internal Signature External signature


Practical-1 How to create user in MySQL Server .

Syntax:

CREATE USER ‘username’@’hostname’ IDENTIFIED BY ‘password’ ;

Practical-2 How to Drop User in MySQL Server.

Syntax:

DROP USER ‘username’@’hostname’ ;


Practical-3 How to Grant all permissions to user in MySQL Server.

Syntax:

GRANT ALL PRIVILEGES ON *.* TO ‘username’@’hostname’ ;

Practical-4 How to provide full permissions on a database to user in


MySQL Server.

Syntax:

GRANT ALL On databaseName.* TO ‘username’@’localhost’ ;


Practical-5 How to provide Select permission to limited tables in
MySQL Database.

Syntax:

GRANT SELECT ON databaseName.tableName TO ‘username’@’localhost’ ;

Practical-6 How to Grant Update, Insert and Delete Permissions on a


Table in MySQL Database.

Syntax:

GRANT UPDATE,INSERT,DELETE ON databaseName.tableName TO


‘username’@’localhost’ ;
Practical-7 Grant permission to individual fields ( Columns) in
MySQL

Syntax:

GRANT SELECT(Column1,Column2,..ColumnN) On
databaseName.tableName TO ‘username’@’localhost’ ;

Practical-8 How to give permission to User to Grant permissions to


Other Users in MySQL Server

Syntax:

GRANT ALL PRIVILEGES ON databaseName.tableName TO


‘username@’localhost’ ;
Practical-9 How to Rename user in MySQL Server.

Syntax:

RENAME USER ‘old_username’@’localhost’ TO ‘new_username’@’localhost’

Practical-10 How to Revoke Permissions for user in MySQL server.

Syntax:

REVOKE ALL, GRANT OPTION FROM ‘username’@’localhost’ ;


Practical-11 How to Change Password of a user in MySQL Server.

Syntax:

ALTER USER 'userName'@'localhost' IDENTIFIED BY 'New_Password';

Practical-12 How to change Root password in MySQL Server


installed on Windows and Linux.

Syntax:

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘New_Password’ ;

You might also like