mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 01:32:23 +08:00
Merge pull request #4124 from karies/PhpBBPort
Make MySQL port number configurable.
This commit is contained in:
commit
a00ba1d3e9
|
@ -34,6 +34,7 @@ module ImportScripts::PhpBB3
|
|||
def create_database_client
|
||||
Mysql2::Client.new(
|
||||
host: @database_settings.host,
|
||||
port: @database_settings.port,
|
||||
username: @database_settings.username,
|
||||
password: @database_settings.password,
|
||||
database: @database_settings.schema
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
database:
|
||||
type: MySQL # currently only MySQL is supported - more to come soon
|
||||
host: localhost
|
||||
port: 3306
|
||||
username: root
|
||||
password:
|
||||
schema: phpbb
|
||||
|
|
|
@ -61,6 +61,7 @@ module ImportScripts::PhpBB3
|
|||
class DatabaseSettings
|
||||
attr_reader :type
|
||||
attr_reader :host
|
||||
attr_reader :port
|
||||
attr_reader :username
|
||||
attr_reader :password
|
||||
attr_reader :schema
|
||||
|
@ -70,6 +71,7 @@ module ImportScripts::PhpBB3
|
|||
def initialize(yaml)
|
||||
@type = yaml['type']
|
||||
@host = yaml['host']
|
||||
@port = yaml['port']
|
||||
@username = yaml['username']
|
||||
@password = yaml['password']
|
||||
@schema = yaml['schema']
|
||||
|
|
Loading…
Reference in New Issue
Block a user