lib/source/database/students_db.rb in shnaider_code-2.0.2 vs lib/source/database/students_db.rb in shnaider_code-2.0.3

- old
+ new

@@ -4,10 +4,10 @@ class StudentsDB attr_private_accessor :db_connection def initialize() - self.db_connection = Mysql2::Client.new(:host => "localhost", :username => "root") + self.db_connection = Mysql2::Client.new(:host => "localhost", :username => "root", :password => "root") self.db_connection.query('CREATE DATABASE IF NOT EXISTS my_db') self.db_connection.query('USE my_db') self.db_connection.query('DROP TABLE IF EXISTS student') self.db_connection.query(File.read(File.dirname(__FILE__) + '/scripts/create_table.sql')) self.fill_data() \ No newline at end of file