MySQL statement/bind values issue

Hi,

I am crossposting this from snorby forum since it does appear to be a
more general issue:

I am running into an error when trying to install on Centos 6
(2.6.32-573.3.1.el6.centos.plus.i686) with MySQL version 5.7.10. The
following is the trace from the ’

[[email protected] snorby]# rake snorby:setup --trace
No time_zone specified in snorby_config.yml; detected time_zone:
US/Pacific-New
** Invoke snorby:setup (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute snorby:setup
** Invoke secret (first_time)
** Execute secret
e7fde492338b1709cba13d919f2b4856720541c6719c864de39fa7f8698d3cb6c062fa1bf697fab86ef958e7f00a9613ae29d58656d9e1605da7f75d16cda53e
** Invoke db:create (first_time)
** Invoke environment
** Execute db:create
mysql: [Warning] Using a password on the command line interface can be
insecure.
ERROR 1007 (HY000) at line 1: Can’t create database ‘snorby’; database
exists
** Invoke snorby:update (first_time)
** Invoke environment
** Execute snorby:update
** Invoke db:autoupgrade (first_time)
** Invoke environment
** Execute db:autoupgrade
Statement: SHOW TABLES LIKE ? [“delayed_jobs”]
rake aborted!
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near ‘’’ at
line 1
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:35:in
execute_reader' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:35:inblock in select’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:277:in
with_connection' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:34:inselect’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-mysql-adapter.rb:22:in
storage_exists?' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-do-adapter.rb:90:increate_model_storage’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-do-adapter.rb:57:in
upgrade_model_storage' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:73:inupgrade_model_storage’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:145:in
auto_upgrade!' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:47:inblock in repository_execute’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:46:in
each' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:46:inrepository_execute’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:27:in
auto_upgrade!' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-rails-1.2.1/lib/dm-rails/railties/database.rake:47:inblock (3 levels) in <top (required)>’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-rails-1.2.1/lib/dm-rails/railties/database.rake:46:in
each' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/dm-rails-1.2.1/lib/dm-rails/railties/database.rake:46:inblock (2 levels) in <top (required)>’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:205:in
call' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:205:inblock in execute’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:200:in
each' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:200:inexecute’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:158:in
block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:inmon_synchronize’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:151:in
invoke_with_call_chain' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:144:ininvoke’
/var/www/html/snorby/lib/tasks/snorby.rake:40:in block (2 levels) in <top (required)>' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:205:incall’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:205:in
block in execute' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:200:ineach’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:200:in
execute' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:158:inblock in invoke_with_call_chain’
/usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in
mon_synchronize' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:151:ininvoke_with_call_chain’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:144:in
invoke' /var/www/html/snorby/lib/tasks/snorby.rake:33:inblock (2 levels) in
<top (required)>’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:205:in
call' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:205:inblock in execute’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:200:in
each' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:200:inexecute’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:158:in
block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:inmon_synchronize’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:151:in
invoke_with_call_chain' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/task.rb:144:ininvoke’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:112:in
invoke_task' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:90:inblock (2 levels) in top_level’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:90:in
each' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:90:inblock in top_level’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:129:in
standard_exception_handling' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:84:intop_level’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:62:in
block in run' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:129:instandard_exception_handling’
/var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/lib/rake/application.rb:59:in
run' /var/www/html/snorby/vendor/bundle/ruby/2.2.0/gems/rake-0.9.2/bin/rake:32:in<top (required)>’
/usr/local/rvm/rubies/default/bin/rake:23:in load' /usr/local/rvm/rubies/default/bin/rake:23:in
/usr/local/rvm/rubies/default/bin/ruby_executable_hooks:15:in eval' /usr/local/rvm/rubies/default/bin/ruby_executable_hooks:15:in
Tasks: TOP => db:autoupgrade
[[email protected] snorby]# .

The line before the ‘rake aborted!’ line is a debugging statement I
inserted to show that the bind values are there. Nevertheless, this is
what the log says:

[datamapper] Setting up the “development” environment:
[datamapper] Setting up :default repository: ‘snorby’ on mysql
SQL (0.067ms) SET sql_auto_is_null = 0
SQL (0.062ms) SET SESSION sql_mode =
‘ANSI,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION,TRADITION
AL’
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near ‘’’ at
line 1 (code: 1064, sql state: 42000, query: SHOW TABLES LIKE ', uri:
mysql:[email protected]?database=snorby&path=snorby&adapter=mysql&username=root&password=xxxxx&host=localhost)

The DB logs the following:

2016-03-12T17:06:09.224873Z 4172 Connect [email protected] on snorby using
Socket
2016-03-12T17:06:09.225044Z 4172 Query SET NAMES utf8
2016-03-12T17:06:09.225175Z 4172 Query SET sql_auto_is_null = 0
2016-03-12T17:06:09.225579Z 4172 Query SET SESSION sql_mode =
‘ANSI,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION,TRADITIONAL’

Any help would be greatly appreciated!

cheers,
h.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs