write a c++ program to add a user to mysql.the user should be
permitted to only "insert" into the given database

Answer Posted / riyas_isno

CREATE PROCEDURE createUser (OUT param1 INT)
BEGIN
CREATE USER 'sonu'@'localhost' IDENTIFIED BY 'riyaz';
GRANT insert ON db1.* TO 'riyaz'@'localhost';
END

hope this will be the answer ....try it......

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to include numeric values in sql statements?

506


What is mysql protocol?

465


How many columns can a table have?

490


How can you retrieve a particular number of records from a table?

503


Is mysql connect deprecated?

494






Which statement is used in a select query for partial matching?

618


Transactions are used to treat sets of SQL statements atomically. State Whether True or False?

997


What is a scalar function?

530


Is mysql from oracle?

507


How do I remove a user from mysql?

563


What is ntext?

618


What's new in mysql 8?

566


How do I edit a trigger in mysql?

488


Why do we use group by and order by function in mysql?

525


In which language it is written?

528