I''m am writing a Rails app as a second front-end to another system. That system handles all writing to the database. The database is very large, with hundreds of thousands of records. It is not practical to duplicate the database nor try to replicate the functionality that updates and maintains it. It is also highly dependent on the underlying file system, all of which is my way of saying that I must "work hot" on the live db. My app must be read only. Is there any way to absolutely prevent all writes from Rails to the database (either within my app, or in MySql) so I don''t accidentally or through carelessness have Rails drop a table or overwrite large portions of data? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> I''m am writing a Rails app as a second front-end to another system. That > system handles all writing to the database. > > The database is very large, with hundreds of thousands of records. It is > not practical to duplicate the database nor try to replicate the > functionality that updates and maintains it. It is also highly dependent > on the underlying file system, all of which is my way of saying that I > must "work hot" on the live db. > > My app must be read only. Is there any way to absolutely prevent all > writes from Rails to the database (either within my app, or in MySql) so > I don''t accidentally or through carelessness have Rails drop a table or > overwrite large portions of data?Configure a read only user within mysql and use that in your database.yml file. I do this at work when I need to query our production database just to be sure I don''t mess up and it works fine. something like this in mysql: grant select on productiondb.* to rouser-SPXQTMr/SINWk0Htik3J/w@public.gmane.org identified by ''password'' Check the docs for the exact syntax. -philip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---