I have read somewhere that, there is no driver for "MariaDB" in Laravel 5 and that we can use mysql driver to use MariaDB in Laravel 5. But even then I am getting this error when i give my MariaDB username and password. The password is "root" and username is also "root".
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Can someone guide me on how to configure MariaDB to be used with Laravel 5.
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3307'),
'database' => env('DB_DATABASE', 'doctorsondemand'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'root'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
Well, the problem was with the port. By default it is not mentioned and they take it as 3306. So, we have to include that line and mention that the port is 3307. That solved the problem. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With