Laravel makes connecting with MySQL databases and running queries extremely simple out of the box. The MySQL database configuration for your application is located at Laravel Project Root Folder, config/database.php
. In this file you may define MySQL database connection for your Laravel Application.
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), // usually localhost, or mysql database server ip address 'port' => env('DB_PORT', '3306'), // default port 3306, or mention port in which it run on your server if it different 'database' => env('DB_DATABASE', 'forge'), // mention your mysql database name here 'username' => env('DB_USERNAME', 'forge'), // mention your mysql database privileged user name 'password' => env('DB_PASSWORD', ''), // password of your mysql database user 'charset' => 'utf8mb4', // your mysql database charset 'collation' => 'utf8mb4_unicode_ci', // your mysql database collation 'prefix' => '', 'strict' => true, 'engine' => null, ],
if you have any questions regarding Laravel MySQL database connection, please feel free to leave your comment bellow.
Be the first one to write a response :(
{{ reply.member.name }} - {{ reply.created_at_human_readable }}