Method: MysqlManager::Utilities#initialize
- Defined in:
- lib/mysql_manager/utilities.rb
#initialize(options = {}) ⇒ Utilities
Returns a new instance of Utilities.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/mysql_manager/utilities.rb', line 32 def initialize( = {}) [:dsn] ||= "DBI:Mysql:mysql:localhost" [:username] ||= "root" [:password] ||= "" @log = Logger.new(STDERR) # connect to the MySQL server @dbh = DBI.connect([:dsn], [:username], [:password]) end |