How can I execute a SQL query from a Rails application to a MySQL database?
My application uses Postgres as a primary database, but I need to read some information from a secondary MySQL database. I can't create models because the MySQL database has more than 100 tables, named in an incompatible way for every table. Can it be done without ActiveRecord or some other way?
set_table_name "foo". If the number of tables is static and it's likely that you'll use them all, I would start creating models in the order they're needed. There is also support in AR:Base for specifying the primary key field.