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

dan7426
dan7426

I am trying to install October on a Laravel Homestead box using PostgreSQL. I receive the below error during the 'Create admin account' step:

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

The database validation runs ok. I did test and verified that the database validation shows an error when I put in an incorrect username/password.

Below is the install.log file showing the database type should be pgsql, but it is trying to connect to a MySQL instance.

.============================ POST REQUEST ==========================.
[2015/04/06 02:31:17] Postback payload: Array
(
    [step] => createAdmin
    [meta] => Array
        (
            [core] => Array
                (
                    [hash] => 8c4d2e8771d041d411737d8a462917e9
                    [build] => 238
                    [uhash] => 48a31188c0d15135af322d2da6919574
                )

        )

    [db_type] => pgsql
    [db_host] => localhost
    [db_port] => 
    [db_name] => october
    [db_user] => homestead
    [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
)

[2015/04/06 02:31:17] Install step: createAdmin
[2015/04/06 02:31:18] Handler error (onInstallStep): SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
[2015/04/06 02:31:18] Trace log:
#0 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(47): PDO->__construct('mysql:host=loca...', 'root', '', Array)
#1 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(20): Illuminate\Database\Connectors\Connector->createConnection('mysql:host=loca...', Array, Array)
#2 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(58): Illuminate\Database\Connectors\MySqlConnector->connect(Array)
#3 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(47): Illuminate\Database\Connectors\ConnectionFactory->createSingleConnection(Array)
#4 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(177): Illuminate\Database\Connectors\ConnectionFactory->make(Array, 'mysql')
#5 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(65): Illuminate\Database\DatabaseManager->makeConnection('mysql')
#6 /home/vagrant/Code/october/public/plugins/shahiemseymor/ckeditor/vendor/illuminate/support/Facades/Schema.php(26): Illuminate\Database\DatabaseManager->connection()
#7 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(118): Illuminate\Support\Facades\Schema::getFacadeAccessor()
#8 /home/vagrant/Code/october/public/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(202): Illuminate\Support\Facades\Facade::getFacadeRoot()
#9 /home/vagrant/Code/october/public/modules/system/Classes/UpdateManager.php(108): Illuminate\Support\Facades\Facade::__callStatic('hasTable', Array)
#10 /home/vagrant/Code/october/public/modules/system/Classes/UpdateManager.php(108): Illuminate\Support\Facades\Schema::hasTable('migrations')
#11 /home/vagrant/Code/october/public/install_files/php/Installer.php(504): System\Classes\UpdateManager->update()
#12 /home/vagrant/Code/october/public/install_files/php/Installer.php(369): Installer->createAdminAccount()
#13 /home/vagrant/Code/october/public/install_files/php/Installer.php(48): Installer->onInstallStep()
#14 /home/vagrant/Code/october/public/install_files/php/boot.php(74): Installer->__construct()
#15 /home/vagrant/Code/october/public/install.php(1): include('/home/vagrant/C...')
#16 {main}

I have verified that the database.php file is getting written correctly.

'default' => 'pgsql',

'connections' => [

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

    'mysql' => [
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'port'      => '',
        'database'  => 'database',
        'username'  => 'root',
        'password'  => '',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ],

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

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

],

Is there something else I am missing, or is this a bug?

dan7426
dan7426

[SOLVED]

Well, I got the same error when trying to install to MySQL, however I was able to resolve the issue by deleting all the files except install.php and install_files and rerunning the installer.

To try and dig a little deeper, I ran a diff to see any differences between my original database.php that was created during the failed install (on pgsql) and the database.php that was created during the successful install (on mysql). Other than the differences that would be expected, I see that the port for the redis database was changed. In the original failing file, the Redis port is set to 5432, but in the new file, the port is set correctly to 6379. Not sure what to make of it.

Last updated

1-2 of 2

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