Support the ongoing development of Laravel.io →
Configuration Database

Hello, I face a problem when I try to migrate my database. My app/config/local/database.php configuration file contains the following lines of code:

<?php

return array(


 'connections' => array(

  'default' => 'mysql',



   'mysql' => array(
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'u-support',
   'username'  => 'homestead',
    'password'  => 'secret',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
   'prefix'    => '',
  )

  )


  );

In my app/bootstrap/start.php I have included:

$env = $app->detectEnvironment(function(){

 return getenv('ENV') ? : 'local';


});

The migrations had successfully created and run before I upgrade to 4.2.11(4.2.9 I think was the previous version I was using).I have followed all the steps needed to upgrade to Laravel 4.2.*

The command I give the terminal is :

 php artisan migrate --env=local

Note: I use homestead and Laravel 4.2.11 as mentioned before.

Any ideas to overcome that problem? Thank you in advance

Last updated 3 years ago.
0

Can you check your phpinfo() to make sure that the MySQL PDO extension is installed?

Create a test.php in your public folder, containing <?php echo phpinfo(); ?>. Then open localhost/test.php and see if MySQL is under the PDO header.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

johnnemo johnnemo Joined 1 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.