[英]what is the best approach to lock the mysql database. no create update and delete opparation
Actually i am currently working on a construction management system which is built in yii. 实际上我目前正在建设一个建于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. 谢谢。
该语句以只读模式打开数据库:
ALTER DATABASE OPEN READ ONLY;
Use database permissions, but I would do it with PHPMyAdmin or MySQL Workbench. 使用数据库权限,但我会使用PHPMyAdmin或MySQL Workbench。 Only provide the users the password for the read-only user account. 仅向用户提供只读用户帐户的密码。 You can grant only select authority to the read only user. 您只能向只读用户授予选择权限。 However, root will always have all authority to any database on the server, so if they are using thier own server, you will be out of luck. 但是,root将始终拥有服务器上任何数据库的所有权限,因此如果他们使用自己的服务器,那么您将失去运气。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.