#Mysqlの設定
初期のmysqlアカウント
vagrant ssh
$ cd ~/Code/Laravel
$ php artisan migrate:install
$ mysql -u homestead -p
$ Enter password:secret
mysql> show databases;
mysql> use homesetad;
mysql> show tables;
+--------------------+
| Database |
+--------------------+
| information_schema |
| homestead |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.10 sec)
/config/database.php の編集
databse,username,passwordなどを編集する
'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,
],
$ mysql -u ユーザー名 -p