Mysql::Error: query: not connected: SHOW TABLES

142 views
Skip to first unread message

Luca Pradovera

unread,
Apr 23, 2013, 11:57:08 AM4/23/13
to rub...@googlegroups.com
Hello,
I have been trying to get a replication running to no avail.

The exception is as follows:

prado@softspider:~/job360$ bundle exec rubyrep --verbose scan -c job360rep.conf
Exception caught: Mysql::Error: query: not connected: SHOW TABLES
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql_adapter.rb:324:in `execute_and_free'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:383:in `tables'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/table_spec_resolver.rb:14:in `tables'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/table_spec_resolver.rb:91:in `block in expand_table_specs'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/table_spec_resolver.rb:83:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/table_spec_resolver.rb:83:in `expand_table_specs'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/table_spec_resolver.rb:116:in `table_pairs_without_excluded'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/table_spec_resolver.rb:60:in `resolve'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/session.rb:100:in `configured_table_pairs'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/base_runner.rb:161:in `table_pairs'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/base_runner.rb:167:in `execute'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/base_runner.rb:187:in `run'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/lib/rubyrep/command_runner.rb:102:in `run'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rubyrep-1.2.0/bin/rubyrep:7:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p180/bin/rubyrep:19:in `load'
/usr/local/rvm/gems/ruby-1.9.2-p180/bin/rubyrep:19:in `<main>'

My config file:

RR::Initializer::run do |config|
  config.left = {
    :adapter  => 'mysql',
    :database => 'DBNAME',
    :username => 'USER1',
    :password => 'PASS1',
    :socket   => '/var/run/mysqld/mysqld.sock'
  }

  config.right = {
    :adapter  => 'mysql',
    :database => 'DBNAME2',
    :username => 'USER2',
    :password => 'PASS2',
    :host     => 'REMOTEIP'
  }

  config.include_tables 'ONE_TABLE'
end

Gems included by the bundle:
  * activemodel (3.2.13)
  * activerecord (3.2.13)
  * activesupport (3.2.13)
  * arel (3.0.2)
  * builder (3.0.4)
  * bundler (1.0.13)
  * i18n (0.6.1)
  * multi_json (1.7.2)
  * mysql (2.9.1)
  * rubyrep (1.2.0)
  * tzinfo (0.3.37)


Any pointers, maybe some version mismatch?
A manual script using the two connections and ActiveRecord works and has access to both DBs.
Thanks in advance!

Luca
Reply all
Reply to author
Forward
0 new messages