国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

laravel項目從本地上傳到云服務(wù)器緩存更新問題
phpcn_u1582
phpcn_u1582 2017-05-16 16:49:17
0
2
554

在本地windows上開發(fā)的時候,.env文件里面數(shù)據(jù)庫名字叫test,我把整個項目文件夾ftp上傳到服務(wù)器(centos7),env文件里面的數(shù)據(jù)庫名字改成了laravel。
然后執(zhí)行php artisan migrate,但是出現(xiàn)如下錯誤,說找不到test數(shù)據(jù)庫:

  [PDOException]                                  
  SQLSTATE[HY000] [1049] Unknown database 'test'

本來就沒有test數(shù)據(jù)庫,哪里來?
這是緩存問題嗎?應(yīng)該怎樣弄一下?

這是database.php:

'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', 'localhost'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix' => '',
    'strict' => true,
    'engine' => null,
],

edit:

這是云主機的.env文件:

    APP_ENV=production
    APP_KEY=base64:fzg/000000000000000001qfE0=
    APP_DEBUG=false
    APP_LOG_LEVEL=debug
    APP_URL=http://localhost
    
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=laravel
    DB_USERNAME=root
    DB_PASSWORD=

這是本地機器上的.env文件:

    APP_ENV=local
    APP_KEY=base64:fzg/000000000000000001qfE0=
    APP_DEBUG=true
    APP_LOG_LEVEL=debug
    APP_URL=http://localhost
    
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=test
    DB_USERNAME=root
    DB_PASSWORD=
phpcn_u1582
phpcn_u1582

全部回復(fù)(2)
左手右手慢動作

php artisan 緩存:清除

過去多啦不再A夢

composer dumpautoload 試試
datebase.php 是 'default' => 'mysql',

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板