duanquanhan2333 2019-05-03 00:07
浏览 107
已采纳

如何修复此错误[2045]或此[1054]当我尝试迁移表时,我总是在终端中收到此消息

when I type php artisan migrate in terminal

I get this error number [2054] and sometimes [1054] !

I tried to change everything like host, username and password in .env file

database.php and config.php file, but it didn't work well

Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = lsapp and table_name = migrations)

at /Users/Ali/education/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) { 664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

  • 写回答

2条回答 默认 最新

  • dtv11049 2019-05-04 15:39
    关注

    Finally, I got the solution by downloading MySQL Workbench then create a new database in this app , and it's working fine

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 matlab求解平差
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 vue2登录调用后端接口如何实现