Turning my existing Drupal 7 site to multisite

Hello! Decided to create a topic here, because I can’t find the solution anywhere else.

I have an existing Drupal 7 site mysite.com. Now it’s a single site. I want to add blog to it on subdomain blog.mysite.com using Drupal miltisite functionality. But after reading documentation and different tutorials, I still can’t understand the process completely. Here’s what I’ve done:

1. Created directory ‘blog’ in /sites/.

2. Copied settings.php file to my /sites/blog directory.

3. I suppose to use the same database for 2 sites with different table prefixes. In my original /sites/default/settings.php file I have:

<?php
$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'mydb',
      'username' => 'myuser',
      'password' => 'mypassword',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => 'mysitepref_'
        ),
    ),
);
?>

In /sites/blog/settings.php I’ve written:

<?php
$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'mydb',
      'username' => 'myuser',
      'password' => 'mypassword',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => array(
            'default'   => 'blogpref_',
            'users'     => 'mysitepref_', /* The same prefix as on main site */
            'sessions'  => 'mysitepref_',
            'role'      => 'mysitepref_',
            'authmap'   => 'mysitepref_',
            ),
        ),
    ),
);
?>

4. Then in sites/ directory I’ve renamed example.sites.php to sites.php and written there:

<?php
$sites = array(
        'blog.mysite.com' => 'blog',
        'mysite.com' => 'default',
);

URL: http://blog.mysite.com
$sites['blog.mysite.com'] = 'blog';

URL: http://mysite.com
$sites['mysite.com'] = 'default';
?>

As a result, site completely stops working.

The question is, what am I doing wrong and how to make it right?

Thank you!

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/21/feed