I\'m using Laravel 5.2. I\'ve setup my first migrations and I want to run them. From the video tutorial it doesn\'t explain how to create a mysql db. I know I can do this man
If you're not going to use a Vagrant box or virtual machine for local development then you're going to have to install your database driver of choice and then create a new database.
To do that with MySQL from the command line run:
$ mysql -uroot -p
mysql> create database yourDatabaseName;
Then cp .env.example .env
and update your database creds.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=yourDatabaseName
DB_USERNAME=root
DB_PASSWORD=root
You'll have set up the username and password to your database when you first installed the driver. After this you may have to php artisan key:generate
and/or 'php artisan config:clearbut
php artisan migrate` should work. Below are some tutorial resources you may find helpful:
Initial database creation and seeding with Laravel 5
How to install MySQL on OSX