|
|
|
@ -107,22 +107,22 @@ class InitializationDataController < ApplicationController
|
|
|
|
|
|
|
|
|
|
# 链接库
|
|
|
|
|
def connect_to_origin_date database
|
|
|
|
|
# ActiveRecord::Base.establish_connection(
|
|
|
|
|
# adapter: "mysql2",
|
|
|
|
|
# host: "rm-bp13v5020p7828r5r.mysql.rds.aliyuncs.com",
|
|
|
|
|
# username: "testeducoder",
|
|
|
|
|
# password: "TEST@123",
|
|
|
|
|
# database: "#{database}",
|
|
|
|
|
# encoding: "utf8"
|
|
|
|
|
# )
|
|
|
|
|
ActiveRecord::Base.establish_connection(
|
|
|
|
|
adapter: "mysql2",
|
|
|
|
|
host: "127.0.0.1",
|
|
|
|
|
username: "root",
|
|
|
|
|
password: "123456",
|
|
|
|
|
host: "rm-bp13v5020p7828r5r.mysql.rds.aliyuncs.com",
|
|
|
|
|
username: "testeducoder",
|
|
|
|
|
password: "TEST@123",
|
|
|
|
|
database: "#{database}",
|
|
|
|
|
encoding: "utf8"
|
|
|
|
|
)
|
|
|
|
|
# ActiveRecord::Base.establish_connection(
|
|
|
|
|
# adapter: "mysql2",
|
|
|
|
|
# host: "127.0.0.1",
|
|
|
|
|
# username: "root",
|
|
|
|
|
# password: "123456",
|
|
|
|
|
# database: "#{database}",
|
|
|
|
|
# encoding: "utf8"
|
|
|
|
|
# )
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|