Permalink
Browse files

Use mysql2 instead of mysql

  • Loading branch information...
1 parent 4f024a9 commit e1cfc45059724e6a2be4979a2cf4420b62db3a2a Philipp Comans committed Nov 30, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 Gemfile
  2. +1 −1 bin/phyta-assign
  3. +2 −2 bin/phyta-setup-taxonomy-db
  4. +1 −1 lib/kingdom_db.rb
View
@@ -4,7 +4,7 @@ source "http://rubygems.org"
# Runtime dependencies
gem "bio", ">= 1.4.2"
-gem "mysql", ">= 2.8.1"
+gem "mysql2"
# For JRuby: gem "mysql", "~> 2.8.1"
gem "sequel", ">= 3.28.0"
gem "fastercsv", ">= 1.5.4" # only for 1.8.7
View
@@ -30,7 +30,7 @@ if RUBY_PLATFORM =~ /java/
puts "You are running JRuby, the jdbc/mysql database connector will be used."
require 'jdbc/mysql'
else
- require 'mysql'
+ require 'mysql2'
end
require 'sequel'
@@ -20,7 +20,7 @@ unless opts[:database_password_given]
end
#Connect to the target database
-connect_string = 'mysql://'+ opts[:database_server] + '/' + opts[:database_name] + '?user=' + opts[:database_user]
+connect_string = 'mysql2://'+ opts[:database_server] + '/' + opts[:database_name] + '?user=' + opts[:database_user]
if !opts[:database_password].nil?
connect_string = connect_string + '&password=' + opts[:database_password]
@@ -31,7 +31,7 @@ if RUBY_PLATFORM =~ /java/
require 'jdbc/mysql'
connect_string = 'jdbc:' + connect_string
else
- require 'mysql'
+ require 'mysql2'
end
PROTEIN_TABLE_NAME = 'proteinGiToTaxonId'
View
@@ -13,7 +13,7 @@ class KingdomDB
def initialize(server, user, password, database)
- connect_string = 'mysql://'+ server + '/' + database + '?user=' + user
+ connect_string = 'mysql2://'+ server + '/' + database + '?user=' + user
if !password.nil?
connect_string = connect_string + '&password=' + password

0 comments on commit e1cfc45

Please sign in to comment.