Question:

Block INSERT to MYSQL?

by  |  earlier

0 LIKES UnLike

Is there anyway to block all inserts to a mysql table, not database. So the only things you can do are like delete and update. Everything BUT insert?

 Tags:

   Report

2 ANSWERS


  1. Yes there is, GRANT can let you specify privileges at the table level.

    See:

    http://dev.mysql.com/doc/refman/5.0/en/g...


  2. You may try script. Generate a text file (s1.txt)  like following:

    use db1;

    INSERT INTO tbl (col1, col2) VALUES (1, 'abc');

    INSERT INTO tbl (col1, col2) VALUES (2, 'xyz');

    ...

    Then execute like:

    cat s1.txt | mysql -u user -p

    Good luck,

    peng

    Got everying at http://www.eptop.com
You're reading: Block INSERT to MYSQL?

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions