I am new to the whole thing of php and laravel. I followed a tuto on internet. and I was trying to create table named "links", but, I got this error:
[PDOException]
SQLSTATE[HY000] [1049] Unknown database 'createlinkstable'
this is the file "database.php":
<?php
return [
'fetch' => PDO::FETCH_OBJ,
'default' => env('DB_CONNECTION', 'mysql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'CreateLinksTable'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
],
'migrations' => 'migrations',
'redis' => [
'cluster' => false,
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
];
and this is the file ".env"
APP_ENV=local
APP_KEY=*******
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=CreateLinksTable
DB_USERNAME=root
DB_PASSWORD=
It's when I try to execute this command "php artisan migrate" that I got the error bellow
Should I create the database CreateLinksTable
manually? If yes,how?
N.B: I am using easyphp
I was reading this post, but it's not helping (Access denied for user 'homestead'@'localhost' (using password: YES))