This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jj843134412
jj843134412

Hi, I'm very new to October, I just downloaded it today and tried to install it on my Ubuntu 16.04 server. I already have Apache2 for a while, and today get PHP7.0 and Mysql freshly installed. The installation was not very smooth, I got many errors at the requirement check first, but after installing all the needed packages and restart the Apache, I can finally proceed to next step.

But now I got stuck at the last stage, an error happened at "Create Admin Account", the error message is :

SQLSTATE[HY000] [1049] Unknown database 'database' (SQL: select * from information_schema.tables where table_schema = database and table_name = migrations) Something went wrong during the installation. Please check the log file (install_files/install.log) or see the documentation for more information.

Here's the last part of my log file:

.============================ POST REQUEST ==========================. [2019/01/14 11:19:46] Postback payload: Array ( [step] => createAdmin [meta] => Array ( [core] => Array ( [hash] => d1028fbd034b2639b0d2ca0869002836 [build] => 446 [uhash] => b4b79ec07b137e6c84605ac76f616781 )

        [plugins] => Array
            (
                [RainLab.Blog] => 791f8428613d4d383481462d3d271477
                [RainLab.Pages] => bdcab1539199022a17ea88ef0923fb8f
                [RainLab.User] => 57b0b68011e2fb5bd8fca8b996732c33
            )

        [themes] => Array
            (
                [RainLab.Relax] => a35c64b09ad6347b8a226291e5b8fd75
            )

    )

[db_type] => mysql
[db_host] => localhost
[db_port] =>
[db_name] => oct_db
[db_user] => october
[db_pass] => *******
[admin_first_name] => Admin
[admin_last_name] => Person
[admin_email] => *******@*****.com
[admin_login] => admin
[admin_password] => *******
[admin_confirm_password] => *******
[backend_uri] => /backend
[encryption_code] => *******
[file_mask] => 777
[folder_mask] => 777
[active_theme] => RainLab.Relax
[handler] => onInstallStep

)

[2019/01/14 11:19:46] Install step: createAdmin [2019/01/14 12:19:46] Handler error (onInstallStep): SQLSTATE[HY000] [1049] Unknown database 'database' (SQL: select * from information_schema.tables where table_schema = database and table_name = migrations) [2019/01/14 12:19:46] Trace log:

#0 /var/www/html/october-install/install-master/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select * from i...', Array, Object(Closure))

#1 /var/www/html/october-install/install-master/vendor/laravel/framework/src/Illuminate/Database/Connection.php(333): Illuminate\Database\Connection->run('select * from i...', Array, Object(Closure))

#2 /var/www/html/october-install/install-master/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(18): Illuminate\Database\Connection->select('select * from i...', Array)

#3 /var/www/html/october-install/install-master/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Database\Schema\MySqlBuilder->hasTable('migrations')

#4 /var/www/html/october-install/install-master/modules/system/classes/UpdateManager.php(135):Illuminate\Support\Facades\Facade::__callStatic('hasTable', Array)

#5 /var/www/html/october-install/install-master/install_files/php/Installer.php(525): System\Classes\UpdateManager->update()

#6 /var/www/html/october-install/install-master/install_files/php/Installer.php(382): Installer->createAdminAccount()

#7 /var/www/html/october-install/install-master/install_files/php/Installer.php(48): Installer->onInstallStep()

#8 /var/www/html/october-install/install-master/install_files/php/boot.php(91): Installer->__construct()

#9 /var/www/html/october-install/install-master/install.php(1): include('/var/www/html/o...')

#10 {main}

The database.php in install-master/config/ is like this:

<?php

return [

/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/

'fetch' => PDO::FETCH_CLASS,

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/

'default' => 'mysql',

/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/

'connections' => [

    'sqlite' => [
        'driver'   => 'sqlite',
        'database' => 'storage/database.sqlite',
        'prefix'   => '',
    ],

    'mysql' => [
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'port'      => 3306,
        'database'  => 'oct_db',
        'username'  => 'october',
        'password'  => '',
        'charset'   => 'utf8mb4',
        'collation' => 'utf8mb4_unicode_ci',
        'prefix'    => '',
    ],

    'pgsql' => [
        'driver'   => 'pgsql',
        'host'     => 'localhost',
        'port'     => 5432,
        'database' => 'database',
        'username' => 'root',
        'password' => '',
        'charset'  => 'utf8',
        'prefix'   => '',
        'schema'   => 'public',
    ],

    'sqlsrv' => [
        'driver'   => 'sqlsrv',
        'host'     => 'localhost',
        'port'     => 1433,
        'database' => 'database',
        'username' => 'root',
        'password' => '',
        'prefix'   => '',
    ],

],

/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk have not actually be run in the databases.
|
*/

'migrations' => 'migrations',

/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/

'redis' => [

    'cluster' => false,

    'default' => [
        'host'     => '127.0.0.1',
        'password' => null,
        'port'     => 6379,
        'database' => 0,
    ],

],

];

Anyone has an idea what the problem is ? I googled and found somebody has the same issue, ( https://github.com/octobercms/october/issues/4049 ), but not a solution.

chrysochos36206
chrysochos36206

Create a database with the name of "database". It seems that there is a bug and the software cannot see any other name. Most probably the database is a variable, written in a wrong way. I hope they will see it and correct it, soon.

alex.migwi29876
alex.migwi29876

What comes to sight is that you may have the wrong database name in your config or mysql. crosscheck the names.

 SQLSTATE[HY000] [1049] Unknown database 'database'
marcm130
marcm130

Hello, trying to perform a clean, basic install of October locally with WAMP and I'm running into this same error message. Did anyone ever find a resolution? Here is the error again, and my install.log. I'm stumped. Thanks!

SQLSTATE[HY000] [1049] Unknown database 'database' (SQL: select * from    information_schema.tables where table_schema = database and table_name = migrations) 
Something went wrong during the installation.Please check the log file (install_files/install.log) or see the documentation for more information.

.============================ POST REQUEST ==========================.
[2019/10/15 04:59:26] Postback payload: Array
(
[step] => downloadCore
[meta] => Array
    (
        [core] => Array
            (
                [hash] => 462e49f2d6d2896abb56874dbdb64aee
                [build] => 458
                [uhash] => 7ecf00bd75e60458191bfcdc43dc14e5
            )

    )

 [handler] => onInstallStep
 )

 [2019/10/15 04:59:26] Install step: downloadCore
 [2019/10/15 04:59:30] Saving to file (core): C:/wamp64/www/October/install-master  /install_files/temp/a74ad8dfacd4f985eb3977517615ce25.arc
 [2019/10/15 04:59:30] Step downloadCore +OK
 [2019/10/15 04:59:30] Execute handler (onInstallStep): Array
 (
 [result] => 
 )

 .============================ POST REQUEST ==========================.
 [2019/10/15 04:59:31] Postback payload: Array
 (
 [step] => extractCore
 [meta] => Array
    (
        [core] => Array
            (
                [hash] => 462e49f2d6d2896abb56874dbdb64aee
                [build] => 458
                [uhash] => 7ecf00bd75e60458191bfcdc43dc14e5
            )

    )

 [handler] => onInstallStep
 )

 [2019/10/15 04:59:31] Install step: extractCore
 [2019/10/15 04:59:31] Extracting file (core): a74ad8dfacd4f985eb3977517615ce25.arc
 [2019/10/15 04:59:39] Step extractCore +OK
 [2019/10/15 04:59:39] Execute handler (onInstallStep): Array
 (
 [result] => 1
 )

 .============================ POST REQUEST ==========================.
 [2019/10/15 04:59:40] Postback payload: Array
 (
 [step] => setupConfig
 [meta] => Array
    (
        [core] => Array
            (
                [hash] => 462e49f2d6d2896abb56874dbdb64aee
                [build] => 458
                [uhash] => 7ecf00bd75e60458191bfcdc43dc14e5
            )

    )

[db_type] => mysql
[db_host] => localhost
[db_port] => 3306
[db_name] => october
[db_user] => october
[db_pass] => *******
[admin_first_name] => Admin
[admin_last_name] => Person
[admin_email] => *******@*****.com
[admin_login] => admin
[admin_password] => *******
[admin_confirm_password] => *******
[backend_uri] => /backend
[encryption_code] => *******
[file_mask] => 777
[folder_mask] => 777
[handler] => onInstallStep
)

[2019/10/15 04:59:40] Install step: setupConfig
[2019/10/15 04:59:40] Step setupConfig +OK
[2019/10/15 04:59:40] Execute handler (onInstallStep): Array
(
[result] => 
)

.============================ POST REQUEST ==========================.
[2019/10/15 04:59:40] Postback payload: Array
(
[step] => createAdmin
[meta] => Array
    (
        [core] => Array
            (
                [hash] => 462e49f2d6d2896abb56874dbdb64aee
                [build] => 458
                [uhash] => 7ecf00bd75e60458191bfcdc43dc14e5
            )

    )

[db_type] => mysql
[db_host] => localhost
[db_port] => 3306
[db_name] => october
[db_user] => october
[db_pass] => *******
[admin_first_name] => Admin
[admin_last_name] => Person
[admin_email] => *******@*****.com
[admin_login] => admin
[admin_password] => *******
[admin_confirm_password] => *******
[backend_uri] => /backend
[encryption_code] => *******
[file_mask] => 777
[folder_mask] => 777
[handler] => onInstallStep
)

[2019/10/15 04:59:40] Install step: createAdmin
[2019/10/15 04:59:40] Handler error (onInstallStep): SQLSTATE[HY000] [1049] Unknown database 'database' (SQL: select * from information_schema.tables where table_schema = database and table_name = migrations)
[2019/10/15 04:59:40] Trace log:
#0 C:\wamp64\www\October\install-master\vendor\laravel\framework\src\Illuminate\Database\Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select * from i...', Array, Object(Closure))
#1 C:\wamp64\www\October\install-master\vendor\laravel\framework\src\Illuminate\Database\Connection.php(333): Illuminate\Database\Connection->run('select * from i...', Array, Object(Closure))
#2 C:\wamp64\www\October\install-master\vendor\laravel\framework\src\Illuminate\Database\Schema\MySqlBuilder.php(18): Illuminate\Database\Connection->select('select * from i...', Array)
#3 C:\wamp64\www\October\install-master\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(221): Illuminate\Database\Schema\MySqlBuilder->hasTable('migrations')
#4 C:\wamp64\www\October\install-master\modules\system\classes\UpdateManager.php(135): Illuminate\Support\Facades\Facade::__callStatic('hasTable', Array)
#5 C:\wamp64\www\October\install-master\install_files\php\Installer.php(525): System\Classes\UpdateManager->update()
#6 C:\wamp64\www\October\install-master\install_files\php\Installer.php(382): Installer->createAdminAccount()
#7 C:\wamp64\www\October\install-master\install_files\php\Installer.php(48): Installer->onInstallStep()
#8 C:\wamp64\www\October\install-master\install_files\php\boot.php(91): Installer->__construct()
#9 C:\wamp64\www\October\install-master\install.php(1): include('C:\\wamp64\\www\\O...')
#10 {main}
daftspunky
daftspunky

It looks like your configuration file may have been corrupted somehow, or left in an incomplete state. Check the file config/database.php to see if your database settings were updated

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.