PDOException SQLSTATE [HY000] [1049] Unknown "forge" database failed

I want to access Mysql data, the first step is to create a new table for "vanvlymen", and I typed mysql> USE vanvlymen; the database has changed. and enter the SHOW tables; showing the available tables that the database contains.

mysql -u root -p 
enter password: ****

mysql> show databases;
-databases-

 information_schema
 mysql
 performance_schema
 phpmyadmin
 vanvlymen

 5 rows...

everything looks good ... I decided to tell mysql to specify the database I'm working on before executing the query as "vanvlymen"

application / Config / database.php

   'mysql' => array(
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'database'  => 'vanvlymen',
        'username'  => 'foobar',
        'password'  => 'foobar',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ),

save as a file go to FileZilla using FTP find the file drag and drop to my live server, overwrite the database.php file.

I tried to clear cache like this

 php artisan cache:clear 

 php artisan migrate

these are errors:

 SQLSTATE[42000] [1049] unknown database 'forge'. 

"forge", vanvlymen. mysql ?

windows 8.1 laravel 4.2

phpmyadmin, , .

+2
4

- app/config/yourEnvironment/database.php? , . "forge" - , , .

0

, - . , - , , OP, :

PDOException SQLSTATE[HY000] [1049] Unknown database 'forge' failed

(!) , , /bootstrap/start.php, , macbook pro!? , - RobMacbookPro2.local RobMacbookPro.local. , , database.php DB = forge ( )

: http://laravel.com/docs/4.2/configuration

:

<?php

$env = $app->detectEnvironment(array(

    'local' => array('your-machine-name'),

));

mac , , linux? , # hostname .

, - !

0

Xampp, MySQL Workbench, Xampp , , , , PHPMyAdmin, localhost: cusotmport (, localhost: 8080).   , , Workbench MySQL, ...

0

config.php services.php /bootstrap/cache. .

0

Source: https://habr.com/ru/post/1615714/


All Articles