2

I am doing a project in laravael framework.

I'm trying to open some pages. It is showing an error:

at PDO->__construct('mysql:host=localhost;port=3306;dbname=dbname', 'root', 'phpmyadminpd', array('0', '2', '0', false, '0')) in Connector.php line 47

My .env file is:

APP_ENV=local
APP_DEBUG=true
APP_KEY=wdIYfgjVOzyDfchid9nBIlOzL4uIAYuY

DB_HOST=localhost
DB_DATABASE=dbname  
DB_USERNAME=root
DB_PASSWORD=phpmyadminpd

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
sinθ
  • 11,093
  • 25
  • 85
  • 121
Janani
  • 21
  • 1

3 Answers3

1

PHPMYADMIN is just a web interface to deal with MySQL and has nothing to do with this.

If an app needs to deal with a database, such a Laravel app, it needs to get connected via the connection configuration files or the env files the usual stack.

Jamal
  • 763
  • 7
  • 22
  • 32
1

From the phpMyAdmin docs:

Configuration

All configurable data is placed in config.inc.php in phpMyAdmin’s toplevel directory. This file only needs to contain the parameters you want to change from their corresponding default value in libraries/config.default.php

Example documentation for reference: https://docs.phpmyadmin.net/en/latest/config.html#config-examples

csief
  • 9
  • 2
0

PHPMYADMIN is just a database management tool. It doesn't have to do anything with Laravel.
You have to deal with MySql. Make sure you put correct MySql database things correctly here

DB_DATABASE=dbname          //your database name  
DB_USERNAME=root           //your database user
DB_PASSWORD=phpmyadminpd   //your database password

I hope this will help you.

Sachith Muhandiram
  • 2,819
  • 10
  • 45
  • 94