Latest

Thursday, July 6, 2017

Connecting to MySQL from Laravel

Asked by: jesders88


I set up a database called cms which I can connect to if I ssh as the root user and I can manipulate the database just fine. I also can connect with MySQL Workbench. However, when it comes to connecting through Laravel 5.4, it will not let me connect to MySQL to run a migration. I have the same credentials in my .env file as I do in MySQL Workbench, but still no connection. Any ideas?

Below is what I have in my .env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cms
DB_USERNAME=root
DB_PASSWORD=


Source

No comments:

Post a Comment

Adbox