doucong4535 2017-02-21 11:11
浏览 334
已采纳

“root @ localhost”访问被拒绝(使用密码:否)

I recently installed mac OSX. I installed latest version of mamp.

I was trying to setup my database, but i got this error.

Access denied for 'root@localhost' (using password: NO)

my .env file --

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=some
DB_USERNAME=root
DB_PASSWORD=

My MySQL port is 3306, Apache port is 80 (I changed it).

I don't change the password of PhpMyAdmin. But I get an error like this.

So I tried entering some password, then it is giving me same error with password using: YES

How can I fix it?

  • 写回答

1条回答 默认 最新

  • dpjjr42626 2017-02-21 11:17
    关注

    If you are using MAMP try this.

    DB_CONNECTION=mysql
    DB_HOST=localhost
    DB_PORT=3306
    DB_DATABASE=some
    DB_USERNAME=root
    DB_PASSWORD=root
    

    Open your MAMP There your will see 3 options 1. Preferences 2. Open WebStart Page 3. Start / Stop Servers

    Click second one [ Open WebStart Page]. It will open mamp info page. Under MySQL area you can see your database connection details.

    MAMP Start

    See your connection details

    Hope it will help you.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料