Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.55 KB | None | 0 0
  1. package SpaceLife::DbConfig;
  2.  
  3. use strict;
  4. use warnings;
  5. use DBIx::Simple;
  6.  
  7. # Connect to the database
  8. our $db_conn = DBIx::Simple->connect(
  9.       # for Docker uncomment this:
  10.       "DBI:mysql:database=spacelife_db;host=spacelife_db;port=3306",
  11.       #for local use only
  12.       # "DBI:mysql:database=spacelife_db;host=localhost;port=3306",
  13.       'root',
  14.       '123',
  15.       # for local use only
  16.       #'g8800gts',
  17.       { mysql_enable_utf8 => 1 }
  18.     ) or die('cannot connect to the database');
  19. $db_conn->result_class = 'DBIx::Simple::Result';
  20.  
  21. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement