How to give user privilages for a db. Login as root. Switch to the mysql db. Grant privs. Update privs.



How to give user privilages for a db. Login as root. Switch to the mysql db. Grant privs. Update pri..

Answer / Akash Kumar Varshney

To give user privileges for a database in MySQL, you need to login as root, switch to the mysql database, grant privileges using GRANT command, and update privileges using FLUSH PRIVILEGES command. Here's an example: `mysql -u root; GRANT ALL PRIVILEGES ON your_database_name.* TO 'username'@'localhost'; FLUSH PRIVILEGES;`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is root password?

1 Answers  


What are the advantages of a procedure?

1 Answers  


How to change the database engine in mysql?

1 Answers  


How to run a sql statement?

1 Answers  


What is the difference between heap table and temporary table?

1 Answers  


What are all the Common SQL Function?

1 Answers  


How to display top 50 rows?

1 Answers  


In the below example, how many String Objects are created? String s1="I am Java Expert"; String s2="I am C Expert"; String s3="I am Java Expert";

1 Answers  


Hi! I’m doing one Project in vb.net 2008 using mysql .In that Project have the following Issues.. 1.if one Employee getting Salary 1.2 lacs / annum means .. After he getting 1st month Salary i want to show remaining 11 month salary.. How can i Create Trigger for this Problem & How can i use it..

1 Answers  


How can I create table in mysql?

1 Answers  


How many columns can a mysql table have?

1 Answers  


How to dump one database for backup.

1 Answers  


Categories