user34537
user34537

Reputation:

create a readonly connection to MySQL?

I looked at the MySql Connection Options and it doesnt seem to be there. Is there a way to create a read only connection/command for .NET? With SQLite i could specify read only=true to do this. What can i do with MySQL?

Upvotes: 2

Views: 259

Answers (2)

Web Logic
Web Logic

Reputation:

You need to add SELECT privileges to a user using GRANT eg:

GRANT SELECT ON db_base.* TO db_user@'localhost' IDENTIFIED BY 'db_passwd';

Resources:

The MySQL Access Privilege System
MySQL grant

Upvotes: 2

aardbol
aardbol

Reputation: 2295

You can create a user with SELECT only privileges

Upvotes: 5

Related Questions