Open gkjangid opened 4 years ago
@gkjangid can you show the content of your database.php file in the config folder?
Database.php
'default' => env('DB_CONNECTION', 'mysql'), 'connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('gitscrumorion'),
'username' => env('gitscrumorionkp'),
'password' => env('gitscrumorionkp_321'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
]
],
Update your database.php file to this:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_PREFIX'),
'strict' => false,
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
],
You should not be changing anything on this file.
Basically, what happens is, in this statement, for example,
'database' => env('DB_DATABASE', 'forge'),
env() takes two parameters,
Database.php
'default' => env('DB_CONNECTION', 'mysql'), 'connections' => [
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), 'database' => env('gitscrumorion'), 'username' => env('gitscrumorionkp'), 'password' => env('gitscrumorionkp_321'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ] ],
@nyrnzn Thanks dear But now i have some other issue i have only 14 tables are come
you can add like this.
https://laravel.com/docs/8.x/migrations#indexes
AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
My .ENV file DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=gitscrumorion DB_USERNAME=gitscrumorionkp DB_PASSWORD=gitscrumorionkp_321
But Db connected