1

Actually i am currently working on a construction management system which is built in yii. Now one project is completed and we have to give them data in view format. we guys are planing to transfer their data on another link so they only can view data.

What is the best way to lock the database, or any other idea is much appreciated.

Thanks.

4

3 回答 3

2

使用数据库权限:创建 SQL 用户并授予他们只读权限。你有读/写权限,你的客户是只读的。

确切的语法取决于 DBMS,但要使用的语句是GRANT

于 2013-05-07T12:03:30.377 回答
1

该语句以只读模式打开数据库:

ALTER DATABASE OPEN READ ONLY;
于 2013-05-07T11:32:49.187 回答
0

使用数据库权限,但我会使用 PHPMyAdmin 或 MySQL Workbench。仅向用户提供只读用户帐户的密码。您只能将选择权限授予只读用户。但是,root 将始终拥有服务器上任何数据库的所有权限,因此如果他们使用自己的服务器,那么您将不走运。

于 2013-05-08T01:06:03.533 回答