duanpu8830 2017-07-15 06:28
浏览 112

虽然我确保所有连接参数都是真的但是laravel返回访问被拒绝用户错误

I Always use .env file to define connection parameters to connect to mysql database.

This is connection Parameters:

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=lms-api
DB_USERNAME=lms_badpey
DB_PASSWORD=*********

I'm sure that all values is true because I used exactly those to login to phpmyadmin on the server But When make request to my app I got this error :

SQLSTATE[HY000] [1044] Access denied for user 'lms_badpey'@'localhost' to database 'lms-api' (SQL: select * from `users` where `email` = ahmad@gmail.com and `confirm` = 1 limit 1)

I tried that with new Database user But all have same results.

This problem is occured only on server and I have not this problem for localhost.

I am confused and I do not know where is problem and how to solve that.

Of Course I'm using Dingo larvel package that I do not think it's relevant.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 2024-五一综合模拟赛
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭