小编har*_*hit的帖子

如何修复“Illuminate\Database\QueryException: SQLSTATE[HY000] [1044] 用户拒绝访问”

我试着跑: php artisan migrate

还可以在 Windows 上使用 Xampp 连接到 MySQL。

我收到这个错误:

Illuminate\Database\QueryException  : SQLSTATE[HY000] [1044] Access
denied for user ''@'localhost' to database 'homestead' (SQL: select *
from information_schema.tables where table_schema = homestead and
table_name = migrations)

  at
C:\Users\harsh\Laravel1\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 …
Run Code Online (Sandbox Code Playgroud)

php mysql laravel laravel-5

9
推荐指数
1
解决办法
6万
查看次数

Phpunit 不工作,说“PHP 警告:”continue”定位开关相当于“break”。你的意思是使用“continue 2”吗?在第 277 行”

我刚刚在我的新电脑上安装了 Laravel 和 PHP。

我已经设置 phpunit 在 :memory 中工作:

正在运行

phpunit

我得到:

PHP 警告:“continue”定位开关等同于“break”。您的意思是使用“继续 2”吗?在 E:\xampp\php\pear\PHPUnit\TextUI\Command.php 第 277 行

警告:“继续”定位开关相当于“中断”。您的意思是使用“继续 2”吗?在 E:\xampp\php\pear\PHPUnit\TextUI\Command.php 中,第 277 行 PHP 警告:“继续”定位开关等效于“中断”。您的意思是使用“继续 2”吗?在 E:\xampp\php\pear\PHPUnit\TextUI\Command.php 第 285 行

警告:“继续”定位开关相当于“中断”。您的意思是使用“继续 2”吗?在 E:\xampp\php\pear\PHPUnit\TextUI\Command.php 中,Sebastian Bergmann 的第 285 PHPUnit 3.7.21 行。

phpunit.xml 环境变量设置为:

<server name="APP_ENV" value="testing"/>
 <server name="DB_CONNECTION" value="sqlite"/>
 <server name="DB_DATABASE" value=":memory:"/>
Run Code Online (Sandbox Code Playgroud)

时间:0 秒,内存:4.00Mb

未执行任何测试!

但我希望测试能够运行!

php phpunit laravel-5

6
推荐指数
0
解决办法
3997
查看次数

标签 统计

laravel-5 ×2

php ×2

laravel ×1

mysql ×1

phpunit ×1