简体   繁体   中英

Database doesn't exist when php artisan migrate

I migrated my local laravel 5 project onto my AWS ec2 lamp Ubuntu server. http://realtoraxe.com/realtoraxe/public/ but it shows

InvalidArgumentException in SQLiteConnector.php line 34: Database does not exist.

I changed the database.php set for sqlite

 <?php
 return array(
    'default' => 'sqlite',
    'connections' => array(
    'sqlite' => array(
        'driver'   => 'sqlite',
            'database' =>    'http://realtoraxe.com/realtoraxe/storage/database.sqlite',
        'prefix'   => '',
       ),
     ),
    );
   ?>

and I changed the .env to

APP_ENV=local
APP_DEBUG=true
APP_KEY=mystring
DB_CONNECTION=sqlite
CACHE_DRIVER=file
SESSION_DRIVER=file

it still doesn't see the database

Laravel probably does not support much of the helper functions( eg storage_path ) inside config files, but it surely does supports env function. More info here

That's the reason it's unable to locate your database. You should define the database in .env file or use the full path in the config file instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM