Database connection with mysql returns error misunderstanded


  • | 288 points

    hi everyone!! my problem.. i've cloned a repository from git following all directives in the author's comments and then at the last step.. i receive an error message! The error is " SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'root'@'localhost' to database 'information_schema' "
    I've tried to change the parameter DB_CONNECTION to pdo in the .env file. But after that i receive this message " Database [pdo] not configured " !!! Now my question.. do laragon or laravel allow me to use PDO for database connection? and in that case how can i use it?

    PS: i'm a novice with that techonlogies (means laragon and laravel framework)

    link for the application repository: https://github.com/bestmomo/laravel5-5-example


  • | 211 points

    Did you enable PDO on your PHP settings?


  • | 288 points

    yes the extension " pdo_mysql " is enabled on Laragon.
    Also i checked the Connection.php file, and its seems like all codes are based on pdo.. Maybe it's the reason why i got errors messages with DB_CONNECTION=mysql in .env file


  • | 288 points

    now i'm add extensions for Laragon.. i'll feedback after all!


  • | 288 points

    okay guys.. i've changed the database and update mysql for 8.0 version and now it works!!


  • | 211 points

    Good to hear that. :grinning:


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.