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

What is blob datatype in mysql?

706


What is identity in mysql?

748


What is a session in mysql?

732


Give string types available for column?

782


What is the use of mysqli_num_rows?

716


What are the 'mysql' command line options?

724


How Switch (select or use) to a database.

808


What do you mean by % and _ in the LIKE statement?

777


How you can create a trigger in mysql?

753


How to use in conditions?

768


I've looked but can't find a MySQL equivalent for MS SQL's xp_cmdshell. I have 7z files that I want to unzip and load into MySQL. I'm trying to write a sp to do the unzip, but I can't find a way to do that. Can anyone provide an example of a similar process in Windows? TIA.

3669


What command is used to delete the data from the table without deleting the table structure?

682


What is session variable in mysql?

748


Explain about reporting services of MYSQL?

843


What is mysqladmin flush hosts?

743