RNB Global University Practical File

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 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